Epyo Posted July 25, 2003 Q:Ok, I made a Decorations lump, and I made a pickup. But I can't pickup the pickup I made! What gives? A:You have to give the pickup a special. Q:Ok, halfway through the level, the pickup spawns. Then I use Thing_setspecial to give it a special. But I still can't pick it up! What gives? Here's the part of the script: THING_SPAWN(100, 251, 0, 0); delay(25); Thing_setspecial(100, 80, 99, 0, 0); A:? 0 Share this post Link to post
Biffy Posted July 25, 2003 What is the special you are giving it? I think the special should be an acs_execute special, the script being a give_inventory script. Looking at LWM's Chosen as an example, she places some decorate items into the map directly and gives them a acs_execute special (does this in the map with a wad editor). Then when the item is picked up, its script executes. One of her scripts: script 13 (void) { GiveInventory ("MWeapLightning", 1); SetWeapon("MWeapLightning"); } I suppose you can do what you say as well but I can't check now. I haven't ever tried spawning a decorate item via thing_spawn or spawnspot and setting the TID, then setting a special that way. Sounds like it should work. 0 Share this post Link to post
Enjay Posted July 25, 2003 Ack don't have my notes handy - this is from memory... THING_SPAWN(100, 251, 0, 0); That should be spawning something with a spawn number of 251 (your new pickup?) at a spot with a tid of 100 - right? Thing_setspecial(100, 80, 99, 0, 0); That is giving a thing with tid 100 a special of 80 (acs_execute) and telling it to use script 99. And there's your problem I think. You are spawning your item at spot 100, but that does not give it a tid of 100. In fact, the way you have things set up, your spawning item will have no tid when it arrives. Your setspecial command is giving your mapspot a special to execute the script because the mapspot has a tid of 100. Which is irrelevant because the mapspot can't trigger the special anyway. You need to spawn your item and give it a tid when you do so. This is done by making the new tid for the item one of the parameters in your spawn instruction (can't remember which ATM) and then you use that new tid to set the special for the item. Edit: I didn't see Biffy's post before I started typing. Epyo is trying to give the item acs_execute. 80 = acs_execute 0 Share this post Link to post
Cyb Posted July 25, 2003 you can give spawned stuff a tid one of four ways, with spawnspot, thing_spawn, spawn and uh, thing_spawn2 I think, but the last one is only for projectiles and I forget the syntax off the top of my head: thing_spawn(mapspot, type, angle, spawned_tid); spawnspot("item", mapspot, spawned_tid, angle); spawn("item", x-coord, y-coord, z-coord, spawned_tid, angle); sooo the answer would be, make your script into this: thing_spawn(100, 251, 0, 100); delay(25); thing_setspecial(100, 80, 99, 0, 0); which will spawn thing with spawnnum 251, at mapspot 100 with a tag of 100 and then give an acs_excute special executing script 99 to all things on the map tagged 100 (so the mapspot will get that special too, but you can't pick up mapspots so it doesn't really matter). hooray! 0 Share this post Link to post
The Ultimate DooMer Posted August 4, 2003 In fact you don't even need the delay(25) either. And if you want to, you can edit the zdefs.acs and give your pickup a string name (eg. T_WHATEVER) to make it easier to remember. 0 Share this post Link to post