Author Topic: How to make events?  (Read 1435 times)

onplayertouch>player>giverandomitem
onplayertouch>self>seteventsenabled[0 1 2][0]
onplayertouch>self>seteventsenabled[0 1 2][1] - delayed

something like that?
the last two lines are pretty good for a timeout
if you're worried about saving incorrectly, throw in a 4th line onminigamereset>self>seteventsenabled[0 1 2][1]

can also swap out onplayertouch with other inputs like onactivate, depending on how you want the input to be (because you still won't tell us)
yes, something like that
this is the input I want
Code: [Select]
registerInputEvent("fxDTSBrick","giverandomitem","Player fxDTSBrick Player Player Client GameConnection");Is that the input you mean?
« Last Edit: September 04, 2015, 03:50:24 PM by Bow »

again, I have no idea what your input event is supposed to do
what will be the target and output in your desired case?
what is actually triggering it? is them being given a random item triggering that event?
your naming is kind of.. stuff for an input event

Code: [Select]
function fxDTSBrick::giverandomitem(%obj, %client)
{
   $InputTarget_["Self"]   = %obj;
   $InputTarget_["Player"] = %client.player;
   $InputTarget_["Client"] = %client;
   //code will go here.
}
registerInputEvent("fxDTSBrick","giverandomitem","Player fxDTSBrick Player Player Client GameConnection");
If I dont get this right.....
I have no idea but please please please be correct.

your naming is kind of.. stuff for an input event
well, what do you expect?
« Last Edit: September 04, 2015, 04:19:47 PM by Bow »

look at all the other input events in the game
they are all INPUT events
they happen as an INPUT to other events
they start with on_, so on _ they do something
onactivate happens when it's activated

so what you're saying to me is your giverandomitem INPUT event happens when the player is given a random item?
that just seems, mostly useless? unless there's a script giving random items, in which case then that would make sense, but it would be named after all the other INPUT events, like onGivenRandomItem

what you're describing in this topic goes completely against that, you're describing you want players to be GIVEN random items, like an OUTPUT event
notice how there's an output event already by default, giveitem? it's an OUTPUT event because it happens to a target AFTER an input has happened



now please cleary state exactly what the duck you're trying to do, step by step how it should work in game, because if you don't motherducking tell us then you're on your own

look at all the other input events in the game
they are all INPUT events
they happen as an INPUT to other events
they start with on_, so on _ they do something
onactivate happens when it's activated

so what you're saying to me is your giverandomitem INPUT event happens when the player is given a random item?
that just seems, mostly useless? unless there's a script giving random items, in which case then that would make sense, but it would be named after all the other INPUT events, like onGivenRandomItem

what you're describing in this topic goes completely against that, you're describing you want players to be GIVEN random items, like an OUTPUT event
notice how there's an output event already by default, giveitem? it's an OUTPUT event because it happens to a target AFTER an input has happened



now please cleary state exactly what the duck you're trying to do, step by step how it should work in game, because if you don't motherducking tell us then you're on your own
Okay, the function im trying to make is an output event in where once a player interacts with the object, the player is given a random item.

if you're trying to make an output event, why not use the output event code instead of the input event code?

if you're trying to make an output event, why not use the output event code instead of the input event code?
I have no idea, I think I just made a mistake that I just figured out right before I made the post.