Anonymous | Login | Signup for a new account | 2024-04-19 19:47 UTC |
My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0003163 | Zandronum | [All Projects] Bug | public | 2017-06-22 02:00 | 2017-06-23 15:31 | ||||
Reporter | eagle | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | Windows | OS | Windows Server 2012 R2 | OS Version | |||||
Product Version | 3.0-beta | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003163: ACS - SetActivatorToTarget - not working | ||||||||
Description | SetActivatorToTarget - not working In version 2.1.2 - works correctly. | ||||||||
Steps To Reproduce | script Hem_StFiendGrndAttack (void) { int old_activator = UniqueTID(); Thing_ChangeTID(0,old_activator); delay(1); int fiend_health = GetActorProperty(old_activator,APROP_Health); SetActorProperty(old_activator,APROP_Health,0); if (SetActivatorToTarget(old_activator)) { int target_tid = ActivatorTID(); delay(random(105,210));//3-6 seconds SetActorState(old_activator,"DontRaise"); int x = GetActorX(target_tid); int y = GetActorY(target_tid); int z = GetActorFloorZ(target_tid); int new_fiend_tid = UniqueTID(); SpawnForced("StoneFiend",x,y,z,new_fiend_tid,0); SetActorProperty(new_fiend_tid,APROP_Health,fiend_health); SetActorState(new_fiend_tid,"RaiseUnderTarget"); ACS_ExecuteAlways(Hem_MarkVictim,0,new_fiend_tid,target_tid); } terminate; } Instead of target of the monster, which is one of the players - the target is the monster himself, as a result - coordinates are taken from the monster itself, and not from the player аctor. Вместо цели монстра, которой является однин из игроков - цель сам монстр, в результате - координаты берутся от положения монстра, а не от игрока. | ||||||||
Attached Files | |||||||||
Notes | |
(0017866) Ru5tK1ng (updater) 2017-06-22 03:32 |
It would be better with an actual test wad, but from the looks of your code, the reason why the target is the monster and not the player is because of this: SetActorProperty(old_activator,APROP_Health,0); Since the monster is dead and wasn't killed by the player, it has no target. The zdoom wiki says: If the actor(monster) has no target, the activator is the actor(monster) itself. There were some changes to pointers with this commit that is in 3.0:'https://github.com/coelckers/gzdoom/commit/5d65ab6e6c21e1efeffe1ad41783ed3bcb17b557 [^]' which is probably why that code worked in with 2.1.2 |
(0017868) eagle (reporter) 2017-06-22 07:14 edited on: 2017-06-22 07:25 |
The call of a script occurs so: Pain: TNT1 A 0 TNT1 A 0 A_ChangeFlag("NOPAIN",1) STDE H 3 TNT1 A 0 A_Jump(160,"FakeDeath") STDE H 3 A_Pain Goto See RaiseUnderTarget: TNT1 A 0 TNT1 A 0 A_UnsetSolid TNT1 A 0 A_SetInvulnerable STDE OP 3 A_CustomMissile("SmokeFX",Random(10,40),0,random(0,360),2,random(0,360)) STDE NM 3 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) TNT1 A 0 A_Explode(random(60,90),120,0) TNT1 A 0 A_Blast(0,100,120,10) TNT1 A 0 A_PlaySound("StoneArmor/Destroy",0,1.5,0) STDE LK 3 A_CustomMissile("SmokeFX",Random(10,40),0,random(0,360),2,random(0,360)) STDE JI 3 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) TNT1 A 0 A_UnSetInvulnerable TNT1 A 0 A_SetSolid GoTo See FakeDeath: TNT1 A 0 TNT1 A 0 A_SetUserVar("user_fake_death",1) TNT1 A 0 A_UnsetSolid TNT1 A 0 A_UnsetShootable TNT1 A 0 A_ChangeFlag("COUNTKILL",0) TNT1 A 0 A_ChangeFlag("CORPSE",1) TNT1 A 0 ACS_ExecuteAlways(Hem_StFiendGrndAttack,0) STDE I 5 A_CustomMissile("SmokeFX",Random(10,40),0,random(0,360),CMF_AIMDIRECTION,random(0,360)) TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,SXF_CLIENTSIDE,0) STDE J 5 A_Scream STDE K 5 A_CustomMissile("SmokeFX",Random(10,40),0,random(0,360),CMF_AIMDIRECTION,random(0,360)) TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,SXF_CLIENTSIDE,0) TNT1 A 0 A_SpawnItemEx("LifeEssence",0,0,0,random(0,4),random(0,4),2,random(0,360),0,32) TNT1 A 0 A_SpawnItemEx("ArmorBonusMax",0,0,0,random(0,4),random(0,4),2,random(0,360),0,32) STDE L 5 STDE MNOP 4 STDE Q 525 Goto DontRaise DontRaise: STDE Q 1 A_FadeOut(0.1,1) Loop |
(0017869) eagle (reporter) 2017-06-22 07:15 |
TNT1 A 0 A_ChangeFlag("CORPSE",1) - lost target? |
(0017870) Ivan (reporter) 2017-06-22 08:45 |
Try giving "+QUICKTORETALIATE" to your player and then try. |
(0017885) eagle (reporter) 2017-06-23 13:41 |
I have changed the script, it work. script Hem_StFiendGrndAttack (void) { int old_activator = UniqueTID(); Thing_ChangeTID(0,old_activator); if (SetActivatorToTarget(old_activator)) { int target_tid = ActivatorTID(); int fiend_health = GetActorProperty(old_activator,APROP_Health); SetActorProperty(old_activator,APROP_Health,0); delay(random(105,210));//3-6 seconds SetActorState(old_activator,"DontRaise"); int x = GetActorX(target_tid); int y = GetActorY(target_tid); int z = GetActorFloorZ(target_tid); int new_fiend_tid = UniqueTID(); SpawnForced("StoneFiend",x,y,z,new_fiend_tid,0); SetActorProperty(new_fiend_tid,APROP_Health,fiend_health); SetActorState(new_fiend_tid,"RaiseUnderTarget"); ACS_ExecuteAlways(Hem_MarkVictim,0,new_fiend_tid,target_tid); } terminate; } |
(0017889) Ru5tK1ng (updater) 2017-06-23 15:31 |
If the script works then there is nothing here to do. |
This issue is already marked as resolved. If you feel that is not the case, please reopen it and explain why. |
|
Supporters: | No one explicitly supports this issue yet. |
Opponents: | No one explicitly opposes this issue yet. |
Issue History | |||
Date Modified | Username | Field | Change |
2017-06-22 02:00 | eagle | New Issue | |
2017-06-22 03:32 | Ru5tK1ng | Note Added: 0017866 | |
2017-06-22 07:14 | eagle | Note Added: 0017868 | |
2017-06-22 07:15 | eagle | Note Added: 0017869 | |
2017-06-22 07:24 | eagle | Note Edited: 0017868 | View Revisions |
2017-06-22 07:25 | eagle | Note Edited: 0017868 | View Revisions |
2017-06-22 08:45 | Ivan | Note Added: 0017870 | |
2017-06-23 13:41 | eagle | Note Added: 0017885 | |
2017-06-23 15:31 | Ru5tK1ng | Note Added: 0017889 | |
2017-06-23 15:31 | Ru5tK1ng | Status | new => closed |
2017-06-23 15:31 | Ru5tK1ng | Resolution | open => no change required |
Copyright © 2000 - 2024 MantisBT Team |