Home   Help Search Login Register  

Author Topic: Varibles  (Read 448 times)

0 Members and 2 Guests are viewing this topic.

StonedSoldier

  • Guest
Varibles
« on: 20 Jan 2004, 12:40:33 »
howdo ppl,

i have two questions for you;

1. If i have a varible how do i display its value as a hint box,

2. I have a varible that is an array (its a map position) woud it be possible to create another varible that is similar to the first but 10 meters away from it.

if it helps im trying to make my own artillary script : - )
« Last Edit: 20 Jan 2004, 12:41:07 by StonedSoldier »

gundernak

  • Guest
Re:Varibles
« Reply #1 on: 20 Jan 2004, 12:47:34 »
2:
in a script:

othervariable = [(oldvariable select 0) + 10, (oldvariable select 1), (oldvariable select 2)]

prehaps, syntax not guaranteed

PsyWarrior

  • Guest
Re:Varibles
« Reply #2 on: 20 Jan 2004, 13:07:58 »
Greetings

1. use this bit of infinately useful code:
Code: [Select]
hint format ["this is the contents of the variable: %1", _Var1]

Explanation: the text in the speech marks can be anything you want. It must have %1 where you want to display the contents of your variable. The bit after the speechmarks shows what will display in %1 (in this case, the contents of _Var1).

If you want multiple variables:
Code: [Select]
hint format ["var1 = %1, var2= %2", var1, var2]

Remember, the text in speechmarks can be whatever you want, as long as it has %1, %2... in it.

Hope this helps. If you need any more explanation, i'll be around somewhere.

-Supreme Commander PsyWarrior
-Psychic Productions
« Last Edit: 20 Jan 2004, 13:09:55 by PsyWarrior »

StonedSoldier

  • Guest
Re:Varibles
« Reply #3 on: 20 Jan 2004, 15:11:44 »
thanks dudes,

ive played around and ive mangaged to solve question 1 my script looks something like this;

Code: [Select]
_artytarget = _this select 0

_gox = _artytarget select 0
_goy = _artytarget select 1
_goz = _artytarget select 2

_artytarget2 = [_gox,_goy + 10,_goz]

thankx for you help guys, i'll prolly need ya again soon