Home   Help Search Login Register  

Author Topic: spawning smoke grenades?  (Read 1272 times)

0 Members and 2 Guests are viewing this topic.

Offline dalton

  • Members
  • *
  • i R n00b
spawning smoke grenades?
« on: 11 Jun 2004, 03:11:58 »
how do i spawn a smoke grenade? preferably red?
"freedom aint free"

Offline nEO iNC

  • Contributing Member
  • **
Re:spawning smoke grenades?
« Reply #1 on: 11 Jun 2004, 10:10:04 »
Hey dalton, you can do the following... Not sure if it's what you want tho...

"smokeshellred" camcreate (getpos 'smoke')

where 'smoke' = gamelogic/unit or vehicle name where you want the smoke to be... (no quotes)

or

"smokeshellred" camcreate (getpos (object '12345'))

where '12345' = objectid of an object in the mission editor (no quotes)

Just put either of the above in a trigger/unit init string etc... You may neeed to check that 'smokeshellred' is correct, think it is...
« Last Edit: 11 Jun 2004, 11:03:05 by nEO iNC »

Offline dalton

  • Members
  • *
  • i R n00b
Re:spawning smoke grenades?
« Reply #2 on: 12 Jun 2004, 00:52:57 »
it dont work...
it says "type object, expect nothing"
"freedom aint free"

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re:spawning smoke grenades?
« Reply #3 on: 12 Jun 2004, 07:07:25 »
More information ! ........... what exactly did you type in?

j-man

  • Guest
Re:spawning smoke grenades?
« Reply #4 on: 12 Jun 2004, 08:12:39 »
You need to use the following code:

_smoke = "smokeshellred" camcreate (getpos gamelogic)

If your putting this into a script, then keep the underscore at the begining. If your putting this somewhere else (trigger, init field), take away the underscore.

This code has been tested, and it works.
« Last Edit: 12 Jun 2004, 08:14:15 by j-man »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:spawning smoke grenades?
« Reply #5 on: 12 Jun 2004, 11:36:58 »
If you get an error message, you should always quote the whole message.   Plus of course the whole of the code that you used.     ;)    "It don't work"  ::) is one of the commonest lines used in this forum, and is unquestionably the most unhelpful.  :P

Also, you should always check the syntax of a command in the comref before using it.    And you should always[/i] check it again before posting.   If I may quote a Comment on camCreate in the online comref:

Quote
You can use camCreate to create objects.  For example:

flare1 = "flare" camCreate getpos gameLogic_1

Which, combined with  nEO iNC's almost excellent post above, solves your problem.    Answers in the forum are almost always fundamentally correct, but it is fairly common for there to be a minor error of syntax.  (It happens to me all the time.  :'()

In this case of course you've been lucky because j-man has kindly spotted the problem.
« Last Edit: 12 Jun 2004, 11:40:49 by macguba »
Plenty of reviewed ArmA missions for you to play