What is the CycleEventContainer supposed to do, and what are you trying to add?
Sorry, I don't fully understand your problem.
|
I need to be able to add events in python to the CycleEventManager for game content and skills however I am a little lost on how I could do this in Python...
I was thinking create a helper function but even that I became lost on... Any ideas would be great.Code:Server.getCycleEventManager().addEvent(new CycleEvent() { @Override public void execute(CycleEventContainer container) { } @Override public void stop() { } }, 1);
What is the CycleEventContainer supposed to do, and what are you trying to add?
Sorry, I don't fully understand your problem.
If you don't understand what the CycleEventContainer is supposed to do then you should not be posting.
I have done some googling and came up with
however that comes back with addEvent(): 1st arg can't be coerced to server.cycleevent.CycleEventCode:if command == "test": class CycleEvent: def execute(container): player.sendMessage("test") return def stop(): return server.getCycleEventManager().addEvent(CycleEvent(), 1)
I know what the EventManager is, but I only work with Emulous servers, and have never come across a 'cycleEventManager'
I like to have game content programmed in using the scripting engine allowing it to be changed dynamically. I have found a way to do this, however I am not sure where the extra arguments come from but it is working as intended.
Code:import server.cycleevent.CycleEvent as cycleevent class test(cycleevent): def execute(a, b): player.sendMessage("testing 123") b.stop() return def stop(a): return server.getCycleEventManager().addEvent(test(), 1)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |