Results 1 to 2 of 2

Thread: Playing FX on trigger

  1. #1
    Private
    Join Date
    Jan 2015
    Posts
    112
    Thanks
    22
    Thanked 32 Times in 17 Posts

    Playing FX on trigger

    Hey guys,

    Sorry I'm asking such a basic question - again, I've never tried doing this before and I don't seem to have much success after trying to copy the steps others take to play an effect, but maybe I'm missing something crucial.

    So the setup is simple (SP map, by the way). I have a script_origin somewhere in my map with the targetname of "smokeorigin" and a trigger_multiple in my map with the targetname of "smoke_trig". What I want to do is begin playing the effect when the player triggers "smoke_trig".

    So I've defined the entities and FX at the beginning of my script:

    Code:
    level.greensmoke = loadfx ("fx/smoke/marker_smoke_green.efx");
    //Not sure if I'm doing this right, can someone please confirm?
    
    level.smokeorigin = getent("smokeorigin","targetname");
    level.smoketrig = getent("smoke_trig","targetname");
    
    //Removed some unneccessary stuff here.
    
    thread playsmoke();
    Code:
    playsmoke()
    {
    	level.smoketrig waittill("trigger");
    	iprintlnbold ("PLAYING FX");//debug message
    	playfx(level.greensmoke,level.smokeorigin.origin);
    }
    The trigger is working since the debug message appears; however, the smoke isn't. Any clues as to where I went wrong?

  2. #2
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    wrong efx maybe. Give a link to effect. OR life fx of time low. Playfx in cycle.
    Code:
    level.smoketrig waittill("trigger");
    iprintlnbold ("PLAYING FX");//debug message
    for(i=0;i<second;i++)
    {
    playfx(level.greensmoke,level.smokeorigin.origin);
    wait 0.*;//life time
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •