Results 1 to 3 of 3

Thread: scripting question

  1. #1
    ok i want to know how to attach a script to a unit. for example. in the zombie mod i want the eventhandler gblonhumanhit to play sound.sqs. in the script sound.sqs i want to make it to where whenever somebody gets hit by a zombie the zombie that does it will say the sound. now i know you could do this by using things like [myzombie] say "furcoatguy 1" but instead of myzombie i want it to be whoever activates the onhumanhit event thing. if you dont understand my question please post and i will try to make it more clear 4 u. thank you all of you, if you guys can help me, i am working on a sweet ass zombie campaign. it should be out in a month or 2, i just started a few days ago.

  2. #2
    If your sound.sqs is exec&#39;d from the event handler with {_this exec "sound.sqs"} then all you need is<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_man = _this select 0[/QUOTE] and _man will be the guy that is hit

  3. #3
    Remember when using the event handlers, that you must define (technical term: override) the unused event handlers too (e.g. gblOnAPCHit, gblOnTankHit) etc etc.

    For the next version of the zombie mod I will make each event handler optional, ie you won&#39;t need to define all of them, but for now, make sure you do.

    PS:
    Remember that the "Say" command is local - you can&#39;t execute a "Say" on the server, you will have to either use a trigger or create a flag for a local script to execute.



    Regards,
    Scott \"Zombie Mod\" T.

    Programmer of the Unified Zombie Mod for Flashpoint (2003)

    Add zombiemod72 as a friend to your XFire account and we'll have a game together.

Posting Permissions

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