Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
AJOgames

Rise Of The Triad-style jump pads for GZDoom?

Question

9 answers to this question

Recommended Posts

  • 0

Thanks, but How would I be able to make this affect both player and enemy?

 

In ROTT, if the player stood on a jump-pad, they would be shot up into the air, if an enemy did the same thing and stood on a jump-pad, the same thing would happen to them.

 

This is the decorate script I wrote, do you think it would work?

___________________

ACTOR JumpPad 17014
{
    Radius 35
    Height 5
    Mass 500
    scale 1.5
    Speed 0
    PainChance 0
    MeleeDamage 0
    Meleerange 10
    Monster
    +FLOORCLip
    +NoBlood
    +LOOKALLAROUND
    +DONTBLAST
    +NORADIUSDMG
    +ACTLIKEBRIDGE
    +DONTRIP
    +Invulnerable
    States
    {
    Spawn:
        JPPD A 1 
        goto see
    See:
        JPPD A 1
        JPPD A 0 A_Jumpifcloser(10, "Melee", True)
        LOOP
    Melee:
        JPPD A 0 A_FaceTarget
        JPPD A 1 A_ChangeVelocity(0, 0, 240,)
        JPPD BCDEFGHI 0
        JPPD HGFEDCBA 1
        Goto See
    Pain:
        JPPD A 0 A_Pain
        Goto See
Death:
    TNT1 A 0 A_Scream
    Stop
    }
}

Share this post


Link to post
  • 0
1 hour ago, AJOgames said:

Thanks, but How would I be able to make this affect both player and enemy?

 

In ROTT, if the player stood on a jump-pad, they would be shot up into the air, if an enemy did the same thing and stood on a jump-pad, the same thing would happen to them.

 

This is the decorate script I wrote, do you think it would work?

___________________

ACTOR JumpPad 17014
{
    Radius 35
    Height 5
    Mass 500
    scale 1.5
    Speed 0
    PainChance 0
    MeleeDamage 0
    Meleerange 10
    Monster
    +FLOORCLip
    +NoBlood
    +LOOKALLAROUND
    +DONTBLAST
    +NORADIUSDMG
    +ACTLIKEBRIDGE
    +DONTRIP
    +Invulnerable
    States
    {
    Spawn:
        JPPD A 1 
        goto see
    See:
        JPPD A 1
        JPPD A 0 A_Jumpifcloser(10, "Melee", True)
        LOOP
    Melee:
        JPPD A 0 A_FaceTarget
        JPPD A 1 A_ChangeVelocity(0, 0, 240,)
        JPPD BCDEFGHI 0
        JPPD HGFEDCBA 1
        Goto See
    Pain:
        JPPD A 0 A_Pain
        Goto See
Death:
    TNT1 A 0 A_Scream
    Stop
    }
}

I already answered in the other thread, but I will add here that I think this code would make the jump pad itself fly up into the air really really fast, 240 units per tic, or 240 units per tic * 35 tics per second = 8400 units per second.

Share this post


Link to post
  • 0

That's true, I have since changed it a bit, and added the +FloorHugger special, which in theory should prevent the jump-pad itself from going up into the air, since the special basically "glues" the actor to the floor, I might add A_Gravity at some point, but for know, heres the new decorate.

 

ACTOR JumpPad 17014
{
    Radius 35
    Height 5
    Mass 500
    scale 1.5
    Speed 0
    PainChance 0
    MeleeDamage 0
    Meleerange 10
    Monster
    +FLOORCLip
    +NoBlood
    +LOOKALLAROUND
    +DONTBLAST
    +NORADIUSDMG
    +FloorHugger
    +ACTLIKEBRIDGE
    +DONTRIP
    +Invulnerable
    States
    {
    Spawn:
        JPPD A 1 
        goto see
    See:
        JPPD A 1
        JPPD A 0 A_Jumpifcloser(10, "Melee", True)
        LOOP
    Melee:
        JPPD A 0 A_FaceTarget
        JPPD A 1 A_ChangeVelocity(0, 0, 20, CVF_REPLACE)
        JPPD BCDEFGHI 0
        JPPD HGFEDCBA 1
        Goto See
    Pain:
        JPPD A 0 A_Pain
        Goto See
Death:
    TNT1 A 0 A_Scream
    Stop
    }
}

Share this post


Link to post
  • 0

You still have it trying to launch itself with A_ChangeVelocity.  You need to have it give its target a custom inventory item that would then call A_ChangeVelocity.

Share this post


Link to post
  • 0

Another solution would be to use ThrustThingZ, plus, if the jumppad is a 3D construct it could be used in conjunction with GetActorFloorZ with a simple script.

For example:

script 2 (void)

// fixed GetActorFloorZ (int tid)
// 128:ThrustThingZ (tid, force, up/down, set/add);

{
   if (GetActorFloorZ (0) >= 128)
      {
         if(lineside() == LINE_FRONT) 
         {
           ThrustThingZ (0, 200, 0, 0);
         }
      }
}
Spoiler

gysoSn9.jpg

 

Share this post


Link to post
  • 0
16 hours ago, Kappes Buur said:

Another solution would be to use ThrustThingZ, plus, if the jumppad is a 3D construct it could be used in conjunction with GetActorFloorZ with a simple script.

For example:


script 2 (void)

// fixed GetActorFloorZ (int tid)
// 128:ThrustThingZ (tid, force, up/down, set/add);

{
   if (GetActorFloorZ (0) >= 128)
      {
         if(lineside() == LINE_FRONT) 
         {
           ThrustThingZ (0, 200, 0, 0);
         }
      }
}
  Hide contents

gysoSn9.jpg

 

Thank you, seems very interesting what you did here, right now I'm working with sprite-based at the moment, but might move on to 3D constructs/floors later on.

Share this post


Link to post
  • 0

And one more solution would be to use thing type 9999 (Actor Hits Floor) and thing type 9998 (Actor Enters Sector) and attach action specials 72  and 128 to them. Either singly or both, depending on which direction and angle to jump.

 

For example:

 

Spoiler

kyO7RhQ.png

 

Spoiler

u6YBG7Z.png

 

Share this post


Link to post
  • 0
17 hours ago, Kappes Buur said:

And one more solution would be to use thing type 9999 (Actor Hits Floor) and thing type 9998 (Actor Enters Sector) and attach action specials 72  and 128 to them. Either singly or both, depending on which direction and angle to jump.

 

For example:

 

  Reveal hidden contents

kyO7RhQ.png

 

  Reveal hidden contents

u6YBG7Z.png

 

Thanks, this actually worked, but enemies aren't really affected, is it possible to add multiple thing tags?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×