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

How can I reference a spawned monster in a later script.


Script 1 spawns monster and gives it a newtid.


Script 2 makes new monster drop an item when it is killed.


Which Script Type should Script 2 be? KILL?


I put a gameinfo definition in my zmapinfo, and put forcekillscripts equal to one, but I'm not sure if I did it correctly.


Map {}

GameInfo {} 



Share this post

Link to post

1 answer to this question

Recommended Posts

  • 1

For script 2 I'd probably give it another new TID and then do a ThingCount and then do a spawn action for your item on the same new TID (i.e. the monster's corpse).



script 1 (void)
	Thing_SpawnFacing(1, T_IMP, 0, 255);
	While(ThingCount(T_NONE, 255) > 0) Delay(10);
	Thing_SpawnFacing(255, T_BLUEKEYCARD, 1, 0);


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