Jump to content
Sign in to follow this  
multikiller

Little Help

Recommended Posts

Hi,

I just started scripting and stuff, but it isn't working very well.

The main problem i have is: where to enter those script commands.

The only scripted that worked for me is the MoveInDriver, i named my Humvee HMMVV and the Soldier i called Soldier1

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldier1 moveInDriver HMMVV

I placed this online in the waypoint by: On Act.

But that is the only working thing i found! Here an example i tried:

i tried to get a soldier to a watertower object (i called it Watertower), so i putted this line in the waypoint -> On Act: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Soldier1 moveto watertower

But when i tried it, it said:

Error Moveto: Type object, Expected Array.

Another thing i tried was a move from "Armed Assault moves description by Vänskä of LDD Kyllikki" his list:

i tried the switchmove:

* DeadState

So i placed this line in the waypoint -> On Act:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Soldier1 Switchmove Deadstate

But nothing happend sad_o.gif

Can someboy give me a small tutorial where to put those commands (in waypoints or triggers) and how i get them to work? (the scripting thing in the wiki didn't really help)

Thank you!

(sorry for my poor english)

Share this post


Link to post
Share on other sites

try using these commands:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Soldier1 moveto "watertower"

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Soldier1 Switchmove "Deadstate"

when there is an error and it mentions something about arrays, it means something needs to go in quotations. Also, i think you can put the moveto command anywhere you like (trigger, waypoint, etc...), but the switchmove commands only seem to work in waypoints and scripts.

I hav'nt tested either of these so i have no idea if it will work. but give it a go.

Share this post


Link to post
Share on other sites

actually something in quotations is a string... and array would be like this:

[item1,item2,item3] with each item being any type of data including string.

what i would have guessed is that the expected datatype would be an array...

did you try

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldier1 moveto {getpos watertower};

just a thought - could be wrong...

edit: look here

Share this post


Link to post
Share on other sites

hey there

thanx j-man, the deadstate is working!

but that from the watertower isn't working yet sad_o.gif

also to Lethal, it doesn't work sad_o.gif

Share this post


Link to post
Share on other sites

try with () instead of {} - i'm not completely sure about when and where arma expects which one.

also please post what it says as error msg.

Share this post


Link to post
Share on other sites

When i try this line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldier1 moveto {getpos watertower}

i can't press ok, because it says: Moveto: Type Any, expected Object.

when i try this line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldier1 moveto (getpos watertower)

i can press ok, but ingame nothing happens, the soldier doesn't move to the watertower when he reached his waypoint

Share this post


Link to post
Share on other sites

just made a little testmission:

moveto does not seem to be working - my guess is that it tries to send the soldier to the *exact* coordiates which are already occupied by the object you are trying to send him to resulting in failure to comply. just a guess though...

it does work with the simple 'move' command tho, try:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldier1 move (getpos watertower);

btw: if you want an already existing object to be the destination you gotta work with those object ids you can toggle on and off in the editor interface:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_destinationobject = (getpos <known object close to destination>) nearestobject <objectID>;

soldier1 move (getpos _destinationobject);

i tested that and it seems to be working.

unfortunately the 'object' command doesn't seem to be working in arma and you have to use 'nearestobject' instead. the wiki mentions something about a 50m limit but i haven't tested that yet. if this is true that seems quite a limitation to me...

Share this post


Link to post
Share on other sites

Have you tried using the building ID instead of watertower. In OFP you could click show id and it would put an objects id number over it on the editor map. DOn't know if it is the same for arma.

Share this post


Link to post
Share on other sites
Have you tried using the building ID instead of watertower. In OFP you could click show id and it would put an objects id number over it on the editor map. DOn't know if it is the same for arma.

doesn't work that way. buildingID or rather objectID is a simple integer and doesn't say anything about the position. you gotta get the object pointer itself and then retrieve the position from it.

see my post above for details wink_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×