Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help on entity activation
TShapeShifter Offline
Junior Member

Posts: 17
Threads: 5
Joined: Jul 2014
Reputation: 0
#11
RE: Help on entity activation

(07-13-2014, 10:15 PM)Mudbill Wrote: If you need to use global variables, just change the AddLocalVarInt to AddGlobalVarInt, as well as the Set and Get versions. That's all.

wow o: seems simple Smile Thanks for all your help! ^^

okay so its not working with notes from other maps Undecided I've tried adding the same function to each note like:
PHP Code: (Select All)
SetEntityPlayerInteractCallback("note_generic_1""AddOneToFunction"true); 
and then adding the function on each map:
PHP Code: (Select All)
void AddOneToFunction(string &in asEntity)
{
    
AddGlobalVarInt("monster_appear"1);

but it doesnt seem to be working with the notes from other maps... just the one I had written the Global Variable in Undecided Help please, any ideas why it's not working? Undecided
(This post was last modified: 07-13-2014, 11:11 PM by TShapeShifter.)
07-13-2014, 10:45 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#12
RE: Help on entity activation

Don't use PlayerInteractCallbacks. Use SetEntityCallbackFunc.

Callback syntax: void MyFunc(string &in asEntity, string &in type)

Now that I look at it, I forgot the second parameter is a string, not int. That is probably why my example didn't work. I only wrote that example off the top of my head xP

07-14-2014, 12:12 AM
Find




Users browsing this thread: 1 Guest(s)