zovirl 0 Posted December 6, 2001 Hey, I have this script that doesn't work. Â I am starting to think it must be a bug in the game but maybe I'm missing something. Â First, a trigger that works correctly: Name: tCircle Activation: Anybody Present, repeatedly Condition: !((vehicle player) in list tCircle On activation: hint "player left circle" On deactivation: hint "player entered circle" Now, that works properly. Â When the player goes outside, it says he left the circle. Â When the player comes back it says he entered the circle. Â It doesn't matter if the player is riding in a vehicle or not. Â Also, getting in and out of vehicles causes no problems. Now, check out this script which SHOULD do the same thing (unless I'm missing something): #Top ; short delay to keep game from locking ; up if it loops really fast ~.001 ;tInner is a trigger, set to "anybody present", repeatedly @!((vehicle player) in list tInner) hint "player left circle" @(vehicle player) in list tInner hint "player entered circle" goto "top" Ok, that should behave just like the trigger. Â But it doesn't. Â If the player is inside the trigger and gets out of a vehicle, sometimes it will say he left the circle and then says he enetered the circle again. Â Why is it doing this? Â Why does it say the player has left the circle when all he has done is step out of a vehicle? Â And why doesn't this problem affect the trigger? I know I could just stick with the trigger and it would work, but this is really a distilled version of the script to show off the problem. Â I want a bunch of other stuff to happen so a trigger would be a hassle... (Edited by zovirl at 9:53 pm on Dec. 6, 2001) Share this post Link to post Share on other sites
Shirson 0 Posted December 7, 2001 Ur problem in tInner array Ok, trace the script: Player in vehicle and in trigger tInner = [Vehicle] !((vehicle player) in list tInner) -> (Vehicle) in list tInner = true -> !true = false. Script wait on command @!((vehicle player) in list tInner) Player get out vehicle SURPRICE!!!! tInner still contain only [Vehicle] !((vehicle player) in list tInner) -> (player) in list tInner = false -> !false = true. Script show hint "player left circle" Trigger update tInner and now they contain [Vehicle, player] @(vehicle player) in list tInner -> (player) in list tInner = true Script show hint "player entered circle" Try this: #t1 ~.01 ? ((vehicle player) in list tInner) : goto "t1" hint "player left circle" #t2 ~.01 ? !((vehicle player) in list tInner) : goto "t2" hint "player entered circle" goto "t1" Share this post Link to post Share on other sites
zovirl 0 Posted December 7, 2001 Yeah, I guess I could do that....but...I really want to use the @ command. I think it should be more efficient than a polling loop (although I could be wrong...). I do see what is happening though. When the player exits the vehicle, the "vehicle player" starts returning the player a bit before the trigger list gets the player added to it. what a mess Share this post Link to post Share on other sites