Author Topic: [RESOURCE] Add Event Output Target  (Read 1835 times)

This is a little resource I made that allows you to add output targets to existing input events.

Download

Server Target Demonstration:
Code: [Select]
new scriptObject(ServerEventTargetSO);
function ServerEventTargetSO::echo(%this,%val)
{
echo(%val);
}
addEventTarget("Server ServerEventTargetSO","","ServerEventTargetSO.getID()");
registerOutputEvent(ServerEventTargetSO,"Echo","string 200 176",0);
This would allow you to create events like onActivate => Server => Echo [Hello, world!]

Slayer Teams Demonstration:
Code: [Select]
addEventTarget("Team(Client) Slayer_TeamSO","GameConnection","%client.getTeam()");
addEventTarget("Team(Brick) Slayer_TeamSO","fxDtsBrick","%this.getControlTeams()");
registerOutputEvent(Slayer_TeamSO,"BottomPrintAll","string 200 156" TAB "int 1 10 3" TAB "bool 0",1);
  • The first argument is the name of the target and the class of the target, separated by a space.
  • The second argument is the prerequisite target class. For example, the Team(Client) target will only display on events that already have a target of class GameConnection, while the Team(Brick) target will only display on events with an existing target of class fxDtsBrick. Leave this blank for no prerequisite.
  • The third argument is the code used to find the target. Variables that can be used are %client and %this.

Source Code (v1.1)

Quote
v1.1:
  • Prevented duplicate entries.
  • Added some commenting.
« Last Edit: February 18, 2013, 08:40:38 PM by Greek2me »

Nice resource, thanks dude :)

Thanks! Hopefully it is useful.


I had no idea this existed. Thanks!

I had no idea this existed. Thanks!
It didn't until yesterday!  :cookieMonster:

useless you should kill yourself with a rusty spork
cool

a rusty spork
I prefer a foon



A small fix was released that you should definitely download if you've used this already.