Home   Help Search Login Register  

Author Topic: can it be done?  (Read 1347 times)

0 Members and 1 Guest are viewing this topic.

Cam51

  • Guest
can it be done?
« on: 28 May 2003, 05:58:36 »
is there anyway to add some sort of script that tells the player the exact azmuith and height (doesnt have to be real feet or meters, just numbers that get larger the higher u look) he is looking in.

What im looking for, is for the player to select "get azmuith/elevation" in the action menu, when selected the information pops up in either the "hint" box or as a "group" chat message to the player that asked only.

Can this be done, and can anyone help me out as to getting started with making the script and putting it into a mission.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:can it be done?
« Reply #1 on: 28 May 2003, 11:20:49 »
The azimuth is easy, though don't rely on my syntax:-

player groupchat format ["%1",getDir player]

This line would go in a script that was called by the addaction comand.

Height - I assume you mean vertical azimuth - I have no idea.  

If you need help on writing a script check out snYpir's Friendly Intro to Code Snippets and Johan Gustafsson's Scripting tutorial, both in the Ed Depot.      

Look up the commands addaction, format, groupchat, sidechat and getdir in the online command reference.
Plenty of reviewed ArmA missions for you to play

Cam51

  • Guest
Re:can it be done?
« Reply #2 on: 28 May 2003, 17:48:42 »
works great outside of a vehicle, but once i get in the azimut stays the same no matter what direction i look.

Any ideas?

Thnk you.

Offline raedor

  • Members
  • *
    • VBS2
Re:can it be done?
« Reply #3 on: 28 May 2003, 18:15:32 »
do it like hint format ["azimuth: %1", getDir (vehicle player)] and it will work in vehicles, too.
but to get the height is mostly impossible, i think....
« Last Edit: 28 May 2003, 18:16:23 by raedor »

Cam51

  • Guest
Re:can it be done?
« Reply #4 on: 28 May 2003, 18:35:47 »
works great raedor... but once i fire a shot it stops working.

Also, is there anyway to keep the vehicle glued to the ground? the paladin moves backwards evertime i fire.  I removed the fuel from the vehicle (so its just a stationary art. site) but the vehcile slides down the hill.

anyway to fix these 2 issues?

also... i just noticed that when u are in the turret as gunner, the azimuth is counting down, its not giving u the direction u are looking.  the azimuth # just gets smaller.  works outside of the track.
« Last Edit: 28 May 2003, 18:38:06 by Cam51 »

Offline raedor

  • Members
  • *
    • VBS2
Re:can it be done?
« Reply #5 on: 28 May 2003, 18:46:27 »
works great raedor... but once i fire a shot it stops working.
how can that happen???

your other problems:
write a little script:
endHoldPosition = false
_veh = _this
_pos = position _veh
#loop
_veh setPos _pos
~0.001
? ! endHoldPosition: goTo "loop"
exit

open it with nameOfVehicle exec "nameOfScript.sqs"
if u want to end it u have to set endHoldPosition = true
with getDir (vehicle player) u only get the azimuth of the vehicle of the player (or of the player himself, if he isnt in a vehicle). im not sure if there is apossibility to get the direction of the gunner... (getDir (gunner nameOfVehicle)  :D)
« Last Edit: 28 May 2003, 18:47:54 by raedor »

Tania

  • Guest
Re:can it be done?
« Reply #6 on: 30 May 2003, 02:17:10 »
whats syntax?

Pandoz

  • Guest
Re:can it be done?
« Reply #7 on: 30 May 2003, 06:21:56 »
syntaz is like the order of coding that u put for example getindriver would be a type of syntax and he was saying that he might of put in a non-exiting or bad form of syntax or coding.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:can it be done?
« Reply #8 on: 30 May 2003, 12:44:28 »
Tania, Welcome to the forum!

Pandoz is right.    Syntax is to a computer language (like OFP scripting) what grammer is to a human language (like English).

In common use it usually includes spelling as well.     So when somebody says "don't rely on my syntax" they mean "this is basically the right command but the spelling, command order, punctuation or arguments may be wrong."

Hope that helps. ;)
« Last Edit: 30 May 2003, 12:45:20 by macguba »
Plenty of reviewed ArmA missions for you to play