goldblaze 15 Posted February 28, 2015 Hello, I'm trying to make a trigger follow a player, so far I've tried the code line on act: this attachTo [player1]; not sure what I did wrong but it wont attach to the player, any help? Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 28, 2015 try thisTrigger instead of this Share this post Link to post Share on other sites
goldblaze 15 Posted February 28, 2015 try thisTrigger instead of this Doesn't look like it works, I'm trying to get a trigger attached to add editing area so the editable area will follow the player acting as zeus around, maybe I'm setting the trigger incorrectly. The activation is set to none and condition is set to this, if that helps. Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 28, 2015 so how are you making the trigger to activate and execute attachto if you set activation to none? Share this post Link to post Share on other sites
goldblaze 15 Posted February 28, 2015 (edited) Even when set to anyone it doesn't seem to work. ---------- Post added at 10:13 AM ---------- Previous post was at 09:44 AM ---------- set the trigger to anyone for to trigger for now, trying thisTrigger setPos [getPos player1]; I'm probably doing the getPos wrong somehow as it gives me a error that only one array is filled. Edited February 28, 2015 by goldblaze Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 28, 2015 Even when set to anyone it doesn't seem to work. works for me Share this post Link to post Share on other sites
f2k sel 164 Posted February 28, 2015 Usually you attach the trigger from out side the trigger. 1st you give the trigger a name then in a game logic init you would put triggersname attachto [player,[0,0,0]]; If you use triggersname attachto [player]; it will attach to the player but it will be relative to the player not directly on him unless he is inside it when attached. Share this post Link to post Share on other sites
goldblaze 15 Posted February 28, 2015 I got the issue fixed with thisTrigger setPos (getPose player1); but I found what I want to do isn't effected by the trigger after init, so I'm off to zeus editing to ask, thanks for your help killzone, :) Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 28, 2015 Usually you attach the trigger from out side the trigger. Doing this from inside works just fine, thisTrigger is as good as the name var you give it in editor. Share this post Link to post Share on other sites
ProfTournesol 956 Posted February 28, 2015 IIRC some triggers cannot be moved, once the game is initialized. That was the case of the guard trigger unless it has changed recently. Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 28, 2015 IIRC some triggers cannot be moved, once the game is initialized. That was the case of the guard trigger unless it has changed recently. Seems guard triggers are not your normal triggers. They are not even "EmptyDetectors" and giving it a name in editor doesn't create a variable with trigger object. So I'm kinda curious how were you trying to move it? Share this post Link to post Share on other sites
ProfTournesol 956 Posted February 28, 2015 Seems guard triggers are not your normal triggers. They are not even "EmptyDetectors" and giving it a name in editor doesn't create a variable with trigger object. So I'm kinda curious how were you trying to move it? Last time i tried, it was with a setpos command. Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 28, 2015 Last time i tried, it was with a setpos command. I understand this, setPos needs argument, <trigger> setPos ...., it is the <trigger> object I'm curious about, where did you get that? Share this post Link to post Share on other sites
ProfTournesol 956 Posted February 28, 2015 I understand this, setPos needs argument, <trigger> setPos ...., it is the <trigger> object I'm curious about, where did you get that? I simply named it in the editor. Didn't know it wasn't creating a variable. Share this post Link to post Share on other sites
f2k sel 164 Posted February 28, 2015 Doing this from inside works just fine, thisTrigger is as good as the name var you give it in editor. I know it would work but it seems a little odd to have it attach itself as every time the trigger fires it's running more code than is needed and it makes using the condition more complex as it won't fire again until original condition changes. Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 28, 2015 I know it would work but it seems a little odd to have it attach itself as every time the trigger fires it's running more code than is needed and it makes using the condition more complex as it won't fire again until original condition changes. He wanted trigger to attach on act, that is one off really unless set to repeated activation. Share this post Link to post Share on other sites