Home   Help Search Login Register  

Author Topic: Moveing objects with Trigger  (Read 1713 times)

0 Members and 2 Guests are viewing this topic.

Lt.Ryan

  • Guest
Moveing objects with Trigger
« on: 05 Feb 2005, 15:52:26 »
Hi, Im having some trouble with this, I need a maker and some other objects to move to different points on the map using a trigger. I any one could help me out that would be great.
:help:
Thanks


Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Moveing objects with Trigger
« Reply #1 on: 06 Feb 2005, 12:20:19 »
have the trigger run a simple script that setpos's the items you need moved

On activation: [] exec "movestuff.sqs"

and the script
;;;;movestuff.sqs
_location = getpos (object)
"Mymarker" setmarkerpos _location
objectname setpos _location
[groupname, (groupwaypoint number)] setWPpos _location



object is the item that you are using to setpos things too
objectname is the name of the object/vehicle/player you want moving
groupname is the name of the group the unit is in
groupwaypoint number is the specific waypoint number for the group that you want moving

the only thing you cant move is a guard waypoints and built in island objects

you can even move triggers


without more info thats all i can offer


amended forum colour code correction
« Last Edit: 08 Feb 2005, 18:07:46 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Lt.Ryan

  • Guest
Re:Moveing objects with Trigger
« Reply #2 on: 08 Feb 2005, 01:12:40 »
Thanks but im having some troble with that last line
Quote
[groupname, (groupwaypoint number)] setWPpos _location [/color]







Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Moveing objects with Trigger
« Reply #3 on: 08 Feb 2005, 01:23:42 »
Lt. Ryan

Delete the [/color] portion as that is a YaBB code for make the line appear in a certain color (red in other lines). I think that he forgot to add [color] at the beginning and that is why that line did not appear red as did the others.

Other than that, you should be able to change the groupname and groupwaypoint number to the appropiate group and waypoint and the script will work fine.


                                                      Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Lt.Ryan

  • Guest
Re:Moveing objects with Trigger
« Reply #4 on: 11 Feb 2005, 00:07:09 »
Thank you, I will have to do that when i get home to my computer right now im at school. thanks  ;)

Lt.Ryan

  • Guest
Re:Moveing objects with Trigger
« Reply #5 on: 19 Feb 2005, 05:59:16 »
Ok I have tryed and played around with it but i cant find what i am doing wrong.

lets say i want to move a M2 from posA(being where it started) to posB(a pos being marked by a marker) the M2 name=m2 how would i enter this into the script?

also i want to exec this from the action menu how would i do this...
I have tryed a simple flare script but it dosnt work from action menu, it says "flare.sqs not found" now i know the flare sqs is in the folder and does work
this is how i attepted it
this addaction [Fire Flare,{exec "flare.sqs"}]
but it comes up with that "flare.sqs not found" message
what am i doing wrong?

I am still learning so thanks for the help...
« Last Edit: 19 Feb 2005, 06:00:56 by Lt.Ryan »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Moveing objects with Trigger
« Reply #6 on: 19 Feb 2005, 15:51:30 »
Ok I have tryed and played around with it but i cant find what i am doing wrong.

lets say i want to move a M2 from posA(being where it started) to posB(a pos being marked by a marker) the M2 name=m2 how would i enter this into the script?

CODE Template =
objectname setpos (getmarkerpos "markername")

Actual code =
M2 setpos (getmarkerpos "posB")
NB>>> if posB is a marker


also i want to exec this from the action menu how would i do this...
I have tryed a simple flare script but it dosnt work from action menu, it says "flare.sqs not found" now i know the flare sqs is in the folder and does work
this is how i attepted it
this addaction [Fire Flare,{exec "flare.sqs"}]
but it comes up with that "flare.sqs not found" message
what am i doing wrong?

I am still learning so thanks for the help...
this addaction [Fire Flare,{exec "flare.sqs"}

if it is displaying an error message .sqs not found.
There can only be 3 reasons
a) flare.sqs[/ doesnt exist
b) you have made a typo error somewhere, either filename or any script line that refers to it
c) you have not specified the correct path for the flare.sqs

what i mean by "C" is that if you placed it in a folder within your mission folder, lets say you placed it in a folder named "Client"

then

exec "flare.sqs"

should be

exec "client\flare.sqs"
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123