OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: X75TIGER75X on 08 Oct 2008, 00:39:00
-
I don't know if this is answered, but I can't seem find it.
I'm trying to make waypoints connected with trigger to make heli stop and wait until told to. I want to set up camera scripted so helicopters stop and wait until script executes the trigger that will tell helicopter to continue. But I can't find that script
is it 'exec'
or stuff I don't know.
thanks to anyone who answered
-x75tiger75x
-
G'day you could try this method,
name your helicopter
helo1
open the wp where you want it to stop and type this in the onAct box
dostop helo1
when you want it to fly again, In either your tigger's onAct, or your camera script add this line
helo1 doFollow helo1
-
With "stop" do you mean landed and waiting?
-
No, just hovering and wait.
Odin's method helped
Okay, another question I'll post here than making whole new thread, Again, I cannot find this in Editor Guide or internet, how do you teleport object?
I had in my mission is C130 flying, after the game is done executing camera script I need from script call C130 to move xyz location and direction so I can make another camera script.
I hope that's clear enough for you.
-
This script moves an existing plane to indicated position and makes it to keep indicated direction for 4Km.
_plane = _this select 0;
_pos = _this select 1;
_dir = _this select 2;
_speed = (speed _plane)/3.6;
_plane setDir _dir;
_plane setPos _pos;
_plane setVelocity [_speed*sin(_dir),_speed*cos(_dir), 0];
_plane doMove [(_pos select 0)+sin(_dir)*4000,(_pos select 1)+cos(_dir)*4000];
-
Mandoble, Thanks for script but sorry, I'm not sure how to use it. Where do you put coords, unit string, etc?
#EDIT: Removed the unnecessary quote. No need to quote the entire previous post you're replying to. h-
-
_plane = _this select 0; // <-- The plane to move
_pos = _this select 1; // <-- Coords, the position
_dir = _this select 2; // <-- the direction the plane will maintain
.... // <- Rest of the script.
my_plane moving to position of marker named mk_cam2 and then moving West for 4Km.
res = [my_plane, getMarkerPos "mk_cam2", 270]execVM"scriptname.sqf";
-
I'm sorry if I kinda annoying you, Mandoble, but I still got it wrong, It wasn't working in my mission.
I'm still pretty beginner. I tried my best to learn what you're trying to explain.
What I did, I put first part of code in the script but I named it to "T.sqf", I did nothing to the script
then I set marker :teleporttest1 on both fields on the map.
I named my plane Test
finally I put trigger that says res = [test, getMarkerPos "testmarker1", 270]execVM "t.sqf";
and set it as radio command. no error message showed up but it didnt teleport.
Just saying it again, I want a script that INSTANTLY move object with name to location. To TELEPORT. And set it on direction, speed. That's what I wanted.
UPDATE: I tried put res = [my_plane, getMarkerPos "mk_cam2", 270]execVM"scriptname.sqf"; one into script and called it from trigger again, didnt work.
-
I followed mandobles instructions and attached an demo mission which works perfectly. Takes a sec to spot the camel.
-
Hmm, I'll download your file and try it.
UPDATE: Your worked. I'll try redo it again.
UPDATE1: Weird, sometimes it work, sometimes it don't. (Inconsistently) and If you tried to teleport AI, the AI will turn back to and fly to his previous location before he was teleported then fly back to his waypoint.
-
Sorry for bumping this almost-month old thread but I forgot to say thanks Mando and others. I finally got it work. :D