Home   Help Search Login Register  

Author Topic: cam create smoke  (Read 588 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
cam create smoke
« on: 27 Jul 2005, 18:34:06 »
ive got some error when i try to cam create a smoke shell on a game logic i use
Quote
_smk2l = "SmokeShell" CamCreate getpos smokeshelllogic2 ;

to create it the game logics named right and the smoke gets created where i want it to but
i stil get an error wich is
Quote
error local variable in global space
but the smoke still gets created where i want it to
why is this happening ?

plus it ruins apmospshere lots of nice shootings then an error message

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:cam create smoke
« Reply #1 on: 27 Jul 2005, 18:41:54 »
if it's in a trigger, then remove the underscore (_) which tells flashpoint it's a local variable.

Offline 456820

  • Contributing Member
  • **
Re:cam create smoke
« Reply #2 on: 27 Jul 2005, 19:09:13 »
forgot to mention its in a waypoint's on activation field by a helicopter
the thing is ive already got that in a waypoint but instead of _smoke2l its just _smoke and i get no error's with that and i just copied and paste the syntax

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:cam create smoke
« Reply #3 on: 27 Jul 2005, 23:33:37 »
local variables can only be sed in scripts afaik.
i know that waypoints can't have global variables
what might be happening is that both waypoints are going off at the same time, so the second error overwrites the first?

Offline 456820

  • Contributing Member
  • **
Re:cam create smoke
« Reply #4 on: 28 Jul 2005, 08:28:15 »
nope there are 3 choppers everyone boards in them then one sets off then roughly 5 seconds later the next and then the next one chopper activates the waypoint i get text smoke no error then about 5 + seconds the next waypoint activates i get smoke and an error message then the last chopper activates its waypoint smoke and error message

Offline Davies1

  • Members
  • *
  • Bugger this for a game of soldiers!
Re:cam create smoke
« Reply #5 on: 28 Jul 2005, 18:10:46 »
maybe you could put

grenade = "smokeshellgreen" camcreate [getpos smokeshelllogic2, select 0, getpos smokeshelllogic2 select 1,1]

the last number is the height that it appears, i think in metres.

making sure that the logic is called 'smokeshellogic2' or whatever you want to call it.

Maybe you could put this in a trigger activation instead? over the waypoint?

either way it should produce smoke at the location once activated.

Good luck
Beer is the fuel for the Heavy Metal Engine.

Offline 456820

  • Contributing Member
  • **
Re:cam create smoke
« Reply #6 on: 28 Jul 2005, 19:38:55 »
oh wait i forgot this was solved i just missed out the _smk1 = bit so i basically didnt name it cause there was no need and i dont see any error messages
so thanks to Bedges for the idea of removing the _ wich gave me the idea to not name it
but Davies1 thanks for showing interest

anyway
topic solved