Home   Help Search Login Register  

Author Topic: Player Operated Salvage truck script needed  (Read 5546 times)

0 Members and 1 Guest are viewing this topic.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Player Operated Salvage truck script needed
« Reply #30 on: 14 Jan 2008, 08:16:59 »
Just as a quick question: you DID use the 1.09 BETA for this, right? Since addPublicVariableEventHandler is a 1.09-specific command, and if you tried to run it with 1.08 it'd probably give you some kind of error like the one above.

Otherwise, I don't know :D It's all "Spoonerish" to me!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline ironcross

  • Members
  • *
Re: Player Operated Salvage truck script needed
« Reply #31 on: 14 Jan 2008, 14:42:36 »
ahh well i dident think about that  after i thought shurely he woudlent do this because the server dosent run this, & i wouldent be able to test it  :blink: .


ok ill wait till the full 1.9 is out as ive always had bad problems with beta's with flashpoint engine lol

but if it works thats great!

thanks again guys! & ill get back to you when i can get the guys on Field assasins server to upgrade & test it.
« Last Edit: 14 Jan 2008, 15:25:48 by ironcross »
ANY scripts or textures I use will be given DETAILED Acknowledgment's when help or scripts are used.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Player Operated Salvage truck script needed
« Reply #32 on: 14 Jan 2008, 21:47:25 »
Oops, I did clearly say that the change to using addPublicVariableEventHandler was for 1.09 beta, which most servers and people I'm aware of are using. Didn't think to ask whether you were using this patch at all...It just seemed like flogging a dead horse trying to fix an ugly workaround to handle events when the "real" event handlers were now available, which would make the solution more simple as well as work more of the time (SPON Events are fine, but when you have to use a separate publicVariable to send data types that they don't support, they can sometimes not work properly).

EDIT:
To continue in the 1.08 idiom, the publicVariable that I mentioned that I had forgotten was in "addSalvageHandler.sqf":

Code: (addSalvageHandler.sqf) [Select]
// Call this in every vehicle init with:
//  nil = [this] execVM "addSalvageHandler.sqf"
_vehicle = _this select 0;

_vehicle addEventHandler ["killed",
    {
        destroyedVehicle = _this select 0;
        publicVariable "destroyedVehicle";
        ["addSalvageAction", []] call SPON_publishGlobalEvent;
    }
];
« Last Edit: 15 Jan 2008, 23:53:03 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline ironcross

  • Members
  • *
Re: Player Operated Salvage truck script needed
« Reply #33 on: 18 Jan 2008, 12:15:02 »
I know u did m8 i was just in a rush to try it out lol  :D

but i cant thank you chaps (specialy Spooner) for the help!! & i will try it as soon as we get somthing worked out with (FA) chaps.  ;)

p.s i found some people trying the 1st version i was testing with your money system they were just playing with the airfield demo lol DM or somthing..i dunno what they were trying to do with the bank lady though.. :blink: (youd think they never saw a female in arma b4 lol )
ANY scripts or textures I use will be given DETAILED Acknowledgment's when help or scripts are used.