Greetings editing gurus - I'm having trouble finding a decent reference for certain constants - maybe my Google-fu isn't so good today...
Anyway, I am using the ACS function ThingCountSector(actortype, actorTID, tag). to determine a 3D floor sector to drop on shooting a line (i.e. a trap) and ensure I drop the 3D platform the player is currently on. It is triggered when you shoot a wall (basically, if you miss a monster and hit the wall behind it - hence the trap aspect).
The code I have works just fine:
Spoiler
/*
floor will drop if player is standing on a platform and shoots the wall behind
imp ambush room. First shot will drop the floor by 8, second shot will drop all the way.
dropfloor = sector tags of the metal plates
dropfloorctl = tags of control sectors
dropfloorstate = drop state of platform;
0 = not dropped
1 = triggered once
2 = fully dropped
*/int numdropfloors =21;int dropfloor[21]={60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80};int dropfloorctl[21]={160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180};int dropfloorstate[21]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
script 4(void){int a;for(a=0; a<numdropfloors; a++){if(ThingCountSector(T_NONE,0, dropfloor[a])){if(dropfloorstate[a]==1){//kill dropFloorAndCeiling_LowerByValue(dropfloorctl[a],128,256);
dropfloorstate[a]=2;
a = numdropfloors;}if(dropfloorstate[a]==0){//first dropFloorAndCeiling_LowerByValue(dropfloorctl[a],128,8);
dropfloorstate[a]=1;
a = numdropfloors;}}}}
BUT: The issue is of course is the use of the T_NONE constant. According to the zdoom ref above, this is 'any actor'. This is OK if there are definitely no other actors involved...
What I need is the constant that refers to the PLAYER. I can't seem to find any reference to this.
Question
smeghammer
Greetings editing gurus - I'm having trouble finding a decent reference for certain constants - maybe my Google-fu isn't so good today...
Anyway, I am using the ACS function ThingCountSector(actortype, actorTID, tag). to determine a 3D floor sector to drop on shooting a line (i.e. a trap) and ensure I drop the 3D platform the player is currently on. It is triggered when you shoot a wall (basically, if you miss a monster and hit the wall behind it - hence the trap aspect).
The code I have works just fine:
BUT: The issue is of course is the use of the T_NONE constant. According to the zdoom ref above, this is 'any actor'. This is OK if there are definitely no other actors involved...
What I need is the constant that refers to the PLAYER. I can't seem to find any reference to this.
Any help or suggestion gratefully appreciated.
Share this post
Link to post
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.