Advanced Search

Author Topic: Timebomb Platform Actor  (Read 1420 times)

0 Members and 1 Guest are viewing this topic.

January 08, 2011, 02:15:42 PM
Read 1420 times

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Timebomb Platform Actor
« on: January 08, 2011, 02:15:42 PM »
So I've got this actor I'm trying to get to behave like a Time bomb platform from Megaman 4-6

(EDIT: These things)


I'm able to put it in a map and see the behavior as it is implemented but the problem is that I cannot seem to implement the proper actor behavior

I want it to jump to the death state only if the player touches it.. I've got +BUMPSPECIAL in there but that just activates the special

What ways can you detect if the player is touching/ standing on the actor?

Here is the wad with all the lumps in it. Right now it just looks like a static Item-1 (I'm just using the Item-1 as a placeholder)

http://wadhost.fathax.com/files/ladders_etc.zip

The map name is SSW03

(click to show/hide)

The comment shows where I'd like to check if the actor touches but I'm not sure this is even possible or the best way to implement this behavior. Any help is appreciated!

January 08, 2011, 03:13:54 PM
Reply #1

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: Timebomb Platform Actor
« Reply #1 on: January 08, 2011, 03:13:54 PM »
Aah coding! You could try something like this, but the timebomb will still go off if you "touch" it from the sides.

Code: [Select]
actor Timebomb 19155
{
height 4
radius 24
scale 2.5
+FORCEYBILLBOARD
+NOGRAVITY
-SHOOTABLE
+SOLID
+MISSILE // Actor is now a missile, so it dies when something touches it.
States
{
Spawn:
ITEM ABABABABABABABABABABABABAB 3
loop
Death:
ITEM A 0 A_ChangeFlag("NOGRAVITY",1) // missiles lose this flag when it dies
ITEM A 0 A_ChangeFlag("SOLID",1) // missiles lose this flag when it dies
// Countdown animation should probably go here
NAPA A 0 A_Stop
NAPA A 0 A_PlaySoundEx("weapon/napalm", "Weapon")
NAPA A 0 A_ChangeFlag("NOGRAVITY",1)
NAPA D 0 A_Explode(60, 128, 0)
NAPA DEFGHIJKLMNOPQRS 2
stop
}
}

Not 100% this will work first time but it should get you started

January 09, 2011, 05:11:43 PM
Reply #2

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: Timebomb Platform Actor
« Reply #2 on: January 09, 2011, 05:11:43 PM »
Thanks Mike!