StartTouch

Please post any questions about developing your plugin here. Please use the search function before posting!
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

StartTouch

Postby decompile » Sat Jan 16, 2016 5:58 pm

Hey Guys,

How can I only hook OnStartTouch for trigger_multiples?

Syntax: Select all

@EntityPreHook(EntityCondition.is_player, 'start_touch')
def startTouch(stack_data):
player = make_object(Player, stack_data[0])
zone = make_object(Entity, stack_data[1])


I made a debug print but it seems like im only getting "worldspawn"
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Sat Jan 16, 2016 6:20 pm

EntityCondition.is_player, does that a trigger_multiple is a player?
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Postby decompile » Sat Jan 16, 2016 7:00 pm

Thank you @Ayuto

Syntax: Select all

@OnEntityOutput
def f(output_name, activator, caller, value, delay):
if output_name != 'OnStartTouch' or caller.classname != 'trigger_multiple':
return


This helped

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 152 guests