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

kill something, something spawns script?

Recommended Posts

Simple

Player kills spiderdemon, cyberdemon spawns on corpse, when cyberdemon dies, open a door.

NOTE: the cyberdemon can be seen in a "Observation room" in the battle room, but he is frozen and inactive. When the spiderdemon dies, the cyberdemon in that room is teleported onto the corpse and is active now.

That is what i want. Is that possible to be scripted?

Thanks

Share this post


Link to post

Yeah, it's not too complicated.

Give the spiderdemon and the cyberdemons unique TIDs. Let's say 88 for the spider and 99 for the cyberdemon.

Give the spiderdemon the ACS_Execute special (80) so that it'll run a script with this code:

Thing_Activate(99); // "Unfreezes" the cyberdemon
Thing_Move(99, 88); // Moves the cyberdemon to the spider's position
Have the cyberdemon itself have its own special, presumably Door_Open but there are other door specials you might prefer.

Share this post


Link to post
Gez said:

Yeah, it's not too complicated.

Give the spiderdemon and the cyberdemons unique TIDs. Let's say 88 for the spider and 99 for the cyberdemon.

Give the spiderdemon the ACS_Execute special (80) so that it'll run a script with this code:

Thing_Activate(99); // "Unfreezes" the cyberdemon
Thing_Move(99, 88); // Moves the cyberdemon to the spider's position
Have the cyberdemon itself have its own special, presumably Door_Open but there are other door specials you might prefer.


I did exactly as you said, but i get the "INVALID DECLARATOR" Error. Help plox?

Share this post


Link to post

You need to start it like any other: script 1 (void) or open.

Just copy and paste I guess.

#include "zcommon.acs"

Script 1 (void)
{
Thing_Activate(99); // "Unfreezes" the cyberdemon
Thing_Move(99, 88); // Moves the cyberdemon to the spider's position
}

Share this post


Link to post
Krispy said:

You need to start it like any other: script 1 (void) or open.

Just copy and paste I guess.

#include "zcommon.acs"

Script 1 (void)
{
Thing_Activate(99); // "Unfreezes" the cyberdemon
Thing_Move(99, 88); // Moves the cyberdemon to the spider's position
}


It gives me the error on delay.
Then on thing_activate
And so fourth

Help?

EDIT fixed. I forgot the curly brackets...

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
×