Home   Help Search Login Register  

Author Topic: need instruction!!  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

Offline tarrega

  • Members
  • *
  • I'm a llama!
need instruction!!
« on: 16 Feb 2005, 16:16:41 »
please look at this scips below:
 
_HEAP=_this select 0
_HEAPpos=GetPos _HEAP
_HEAPposX=_HEAPpos select 0
_HEAPposY=_HEAPpos select 1
~0.1
_tempObj1 = "SHELL120" camCreate[_HEAPposX, _HEAPposY, 0]
~0.01
_tempObj1=objNull


it is said the scrips of anti-infantry landmine ,but it doesnt work in my testing missions. ??? how could i fix it?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:need instruction!!
« Reply #1 on: 16 Feb 2005, 16:18:59 »
I suspect you haven't initialized the script correctley. Read SnYpir's introduction to code snippets and I'll think you'll understand. ;)

:beat: *Gets Shot* :beat:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:need instruction!!
« Reply #2 on: 16 Feb 2005, 16:25:29 »
Use hints and hint format commands (check the online comref) to check the progress of variables in scripts.   Very handy for debugging.

Also double check the syntax with the comref.

Plenty of reviewed ArmA missions for you to play

Offline tarrega

  • Members
  • *
  • I'm a llama!
Re:need instruction!!
« Reply #3 on: 16 Feb 2005, 16:39:48 »
i added a trigger:
axisA 5, axisB 5, Activation: Weat;on Activation :[this]exec "HEAP.sqs"
and when the squad moved in,what was shown on the top of the screen was:

'_tempObj1 = "SHELL120" camCreate[_HEAPposX, _HEAPposY, 0]|#|';Error Type Any,expected Number
 
what does it mean?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:need instruction!!
« Reply #4 on: 16 Feb 2005, 17:00:37 »
The line of code quoted has an error in it.    The # shows approximately where in the line of code the error occurred.    The error message, "type any, expected number" means that the game was expecting a number, but you (in the line of code) gave it something else.    The game therefore doesn't know what to do and spits out this error message.

Since all you are trying to do is create an explosion at the position of the trigger, you don't need a script.    Try this

On activation:  bang1 = "heat120" camCreat getPos this
Plenty of reviewed ArmA missions for you to play

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:need instruction!!
« Reply #5 on: 16 Feb 2005, 18:13:22 »
Or just use this script:

_HEAP=_this select 0
~0.1
_tempObj1 = "SHELL120" camCreate getpos _HEAP
~0.01
_tempObj1=objNull

:beat: *Gets Shot* :beat: