Jump to content
harv052

This should be simple, yet I can't do it!

Recommended Posts

Hey all! I'm fairly new to the eden editor but I can find my way around it. I was just practicing placing stuff and trying things until I hit a wall...So here's what I'm trying to do: I wanted to place satellite dishes and when the player hit them, smoke would come out. Simple enough it seems...Well I've been at it for hours! First I found out that the dish doesn't take damage so when I tried the "hit" command in a addevenhandler, it wouldn't work! Tried tying a smoke module to the dish and enable the smoke when shot, failed there too. Tried it with a target so that when you hit it, it played a sound. Sure works! So then I thought I'll place multiple steel plates inside the dish then set showmodel to off. Tried it, didn't work. Turns out they fall to the ground at the start, silly me!! Turned off enablesimulation, but then realized that since I don't want the model to show, there's nothing to hit, so this doesn't work either! I am at a loss! This should be so simple yet I can't figure it out! I'm not really that good with scripts and maybe that's my #1 problem and I have a feeling that's where my answer lies! So any help would be appreciated!

Share this post


Link to post
Share on other sites
player addEventHandler ["Fired",  
{ 
 params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];  
 if (cursorObject isEqualTo Antenna) then//Only trigger effect if Antenna is hit
 { 
  AntennaHit = true;//Set variable to true which activates trigger
  player removeEventHandler ["Fired", _thisEventhandler];//Remove event handler again
 }; 
}];

 

This is indeed not as simple. However, I got it working.

 

1. Place your antenna and name it Antenna

2. Place a Smoke module underneath it

3. Create a trigger next to the module, change the condition inside the trigger from this to AntennaHit

4. Connect the trigger to the module

5. Paste the code from above into the init field of the player

 

 

Feel free to ask any further questions regarding this issue.

  • Like 3

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×