Page 1 of 1

A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 1:13 pm
by Wad'a'Holic
Hey there,
Attempting to run this under Zandronum:

Code: Select all

actor ai_destroyer 20000
{
	radius 32
	height 32
	+NOGRAVITY
	+SOLID
	+SLIDESONWALLS
	Monster
	
	health 9999
	
	states
	{
		Spawn:
			NULA A 2 A_Look
		See:
			NULA A 0
			NULA A 0 A_JumpIfInTargetLOS("Freeze", 90)
			NULA AB 2 ThrustThing(angle*256/360, 3, 0, 0)
			NULA B 0 A_PlaySound("weapons/pistol", CHAN_AUTO)
			NULA B 0 A_Chase
			NULA CDEFGHIJK 2 A_FaceTarget
			NULA LM 2 ThrustThing(angle*256/360, 3, 0, 0)
			NULA NOPQRST 2 A_FaceTarget
			goto See
		Freeze:
			NULA A 10
			goto See
	}
}
But I get this error:
Script error, "TotalChaos.pk3:actors/ai_destroyer/actions.txt" line 18:
Invalid state parameter a_jumpifintargetlos

It works under GZDoom, but unfortunately, it doesn't seem to be running the latest tweaks to fix the copy'n'paste JumpIfInTargetLOS/JumpIfTargetInLOS (they do the same thing, I'm assuming this by this thread: http://forum.zdoom.org/viewtopic.php?f=2&t=27014)

Currently running 1.0-alpha.

Anyone know of any good alternatives? I'm trying to make a monster that freezes when the player looks at them.

Thanks,
Wad'a'Holic

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 2:28 pm
by Llewellyn
They don't do the same thing one jumps if the actor sees the target, the other jumps if the target sees the actor.
Also, the latest version is not 1.0-alpha.

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 6:32 pm
by ibm5155
that´s the same thing that I used to recreate scp =D and it doesn´t work too on zan/skull ¬¬

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 10:39 pm
by Wad'a'Holic
Llewellyn wrote: They don't do the same thing one jumps if the actor sees the target, the other jumps if the target sees the actor.
Also, the latest version is not 1.0-alpha.
Hey Llewellyn, also tried the latest build I could find (24th August), but it only looks like A_JumpIfTargetInLOS was implemented recently.

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 10:49 pm
by Cruduxy
I know this is not an effective solution but would making the player pawn shoot an invisible projectile with a radius damagetype that causes the actor to enter freeze be a decent alternative? Painchance 255 of course heh

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 11:16 pm
by TheMisterCat
that sounds remarkably inefficient

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 11:27 pm
by Wad'a'Holic
Cruduxy wrote: I know this is not an effective solution but would making the player pawn shoot an invisible projectile with a radius damagetype that causes the actor to enter freeze be a decent alternative? Painchance 255 of course heh
I was thinking of doing the same thing, a little hacky but it would work.

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 11:29 pm
by Cruduxy
Just remember to not make them do the damage right as they spawn since you'll need a large radius to cover a decent amount of screen and might freeze these actors if they sneak up from behind.
Or could use multiple projectiles with lesser radius to cover this up.

RE: A_JumpIfInTargetLOS, Invalid State in Zandronum

Posted: Wed Sep 05, 2012 11:32 pm
by Ænima
Sounds like a potentially laggy idea.

I have an idea: Try using geometry. Ie determine if the thing is in the player's line of sight by checking the player's location, angle, and pitch, and then comparing those to the thing's position?

(Although tbh that shouldn't even be necessary, A_JumpIfInTargetLOS _should_ work.)