Icon of Sin / Baphomet
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > setthingspecial to projectile
 
Author
All times are GMT. The time now is 21:06. Post New Thread    Post A Reply
gggmork
If you can make any sense of this post, congratulations


Posts: 2827
Registered: 06-07


If I spawn an imp and setthingspecial to it, that special function will execute when the imp dies.
But I want to do it to a projectile like a cacodemonball. Apparently a cacodemonball doesn't "die" (even though it has 1000 health... it has a death state so I don't get it) or execute a set special after it hits a wall (only want to use acs/not decorate preferably).

I want lots of projectiles, and when each "dies" (or whatever), I want to delete a point associated with the projectile (or just execute my own script). I think I can do acs_execute always and have a while(1) constantly checking the "health" of the projectile.. I guess eventually when it "dies", that tid won't exist anymore, so the getactorproperty(tid) will fail and just return 0, so at that point I at least know the projectile died. Seems like lots of unnecessary while loops per projectile when it can just execute code once only when it "dies".

Or something.

And how to give a tid to, say, each rocket the player shoots? Can't use acs only for that maybe?


EDIT:
this works good enough (spawns cacoball and prints its tid when it hits a wall):
code:
#include "zcommon.acs" script 1 open { spawnspot("cacodemonball", 1, 3, 128); acs_executealways(2,0,3); thrustthing(128, 6, 0, 3); } script 2 (int tid) { while(1) { if(getactorproperty(tid, aprop_health) == 0) { print(d:tid); break; } delay(1); } }

Last edited by gggmork on 04-01-13 at 03:35

Old Post 03-31-13 22:46 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11390
Registered: 07-07


When a missile explodes, it isn't "killed", even if it goes to its death state. Dying and exploding are different functions, which do different things, despite having in common that they put the actor in its death state.

You might try to toy a bit with the activation property.

Another thing you can do to force a missile to execute its special when it explodes is this:
code:
Death: BOOM A 0 A_CallSpecial(special, args[0], args[1], args[2], args[3], args[4]) <rest of death state goes here>

Old Post 04-01-13 09:58 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 21:06. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > setthingspecial to projectile

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.