OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods Beta Testing => Topic started by: Robinhansen on 23 Feb 2005, 15:59:23

Title: Camcreated AP mines
Post by: Robinhansen on 23 Feb 2005, 15:59:23
I've got a minefieldscript were I've tested a few types of AP mines (FDFmod, spetznaz mod etc.). All worked when they are placed on the map in the games editor, but none worked when they are camcreated in game. ???
Any ideas why not?  ???
Title: Re:Camcreated AP mines
Post by: ACF on 23 Feb 2005, 16:09:18
Maybe the object has some init code to initialise itself - an editor-placed object would run the code/script when the mission starts but the same wouldn't happen when it's camcreated.  If you could find out what the code is and what information it needs you could conceivably call the code/script after you've camcreated the object.
Title: Re:Camcreated AP mines
Post by: Dubieman on 23 Feb 2005, 18:11:02
The COC mines I have need to be placed first. Cause they have different effects, like the bouncing betty pops into the air and when it comes down....BOOM :o

So pretty much what ACF said.
Title: Re:Camcreated AP mines
Post by: Karik on 23 Feb 2005, 19:09:31
Quote from other forum:

"camCreated objects don't get their init eventHandler executed so the mines don't get 'armed', that would be my guess...

Try using createVehicle instead... createVehicled objects need a bit time to get 'active' so you may need to wait for a while before testing though..."

http://www.tacticalblunder.com/%7Efdfmod/forum/viewtopic.php?t=1173

Maybe that helps.
Title: Re:Camcreated AP mines
Post by: Robinhansen on 24 Feb 2005, 17:04:23
Excatly what I needed...

Cheers m8's - The next round of beer's are on me
 ;D