Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [events]

Event is action that is usually happenes "outside" of main program thread, but handled inside of it.

0
votes
0answers
12 views

Handling events at LIBGDX. The event is registered in two place at the same time

Im creating a turn base-fight game and I have the problem that I want to create a button where you can click it and then it need to click on the target enemy. So far this is the part of the code I ...
0
votes
0answers
16 views

Does the Unity Editor have some sort of OnSceneSave() event or method?

For background, I am currently building an open-world game with what I usually call "story saves", or automatically triggered saves that remember where you were, what you had, and relevant world data ...
6
votes
2answers
2k views

How to make a custom event system framerate friendly?

I have a simple event system: ...
2
votes
2answers
124 views

Effect Replacement System

I'm working on a turn based rpg and have an action/queue system setup that I'm happy with. However, I am having trouble implementing a feature and I am here for some advice. I want to have effects/...
0
votes
1answer
10 views

InputListener not working on a custom Actor

Right now I am working on a UI for my game. I'm adding my own UI elements to a group and adding that to a stage. But the listeners I'm adding to the actors are not firing off at all. I have looked on ...
0
votes
0answers
16 views

Managing multi object communication in an event manager

I am attempting to write an event based manager in my game but am having trouble with some of the implementation. I am aware of how to generate objects with triggers/events where the event modifies ...
1
vote
2answers
108 views

Event queue: tell or ask?

I'm working my way through a lot of game development resources, coming from a completely different field of software development, I'm interested in learning what patterns are frequently used in game ...
7
votes
1answer
110 views

How do I make a quest requiring a certain number of a specific item?

I'm trying to create a quest (in RPG Maker MV) where the player has to collect 35 berries. But when I go to create the conditional branch, this is what I see: It does not let me add a number limit, ...
1
vote
2answers
64 views

Simulating Enums with Javascript

When developing in Javascript, it seems useful especially for event systems to use enum-likes, but not string comparison for performance considerations (also because it doesn't protect against typos). ...
0
votes
1answer
26 views

How to Subscribe to Events from Unity's VRInput Script

I am new to Unity and trying to modify the Unity tutorial Interactive 360 Sample. I want to be able to call a function when a user swipes using an Oculus Go Controller. I noticed that the VRInput ...
0
votes
2answers
243 views

Why does my Window take a few clicks to actually close even though the event fires?

I am pretty new to game dev (and libgdx + scene2d specifically), I am creating a dialog system for an rpg game and obviously a dialog window has a close button to close a dialog but for some reason it ...
0
votes
1answer
41 views

Events vs direct reference in Unity3D?

I'm developing a simple NPC controller that the player can talk with. At the moment a NPCController script on the NPC gameobject manages several "high level" ...
1
vote
1answer
41 views

Can I implement allocation-free time releated event scheduler via pure C#?

I read some article about a gameloop, based on Actor system. (yes, it is Development & Deployment of Multiplayer Online Games Vol.2 by 'No Bugs' Hare) Here is pseudocode. ...
0
votes
0answers
49 views

Subscribing to and sending events on UNET

I am working on large distances, where the clients only need to receive information about other players when they are nearby. I've been doing a little bit of homework and (thanks to another answer on ...
0
votes
1answer
77 views

Unity Custom EventManager, multiple arguments, and order

I have some hard question for me... I have a nice EventManager, who handle multiple arguments. (no argument, one int, one bool, a GameObject and a bool... but for each sort, I have to create a special ...
-2
votes
2answers
104 views

Double Click Unity

Have a class, which I am calling from PointerClick(in EventTrigger). Need to recall PointerClick after the first PointerClick((0.2f) seconds later).
1
vote
0answers
44 views

Sequencing method calls with time delay

I'm trying to solve what seems to be (or should be) a very simple problem. I'd like to sequence several steps in a GameManager class with some time delay between them. In my case, I'd like to clear ...
1
vote
1answer
40 views

How to move while a timer is going in an event

I'm trying to make a switch activated gate and this is what I have setup so far "picture #1" but what happens when the timer is going on, I cannot move. so what I'm trying to do is go through the ...
1
vote
1answer
87 views

Synchronise events in Multiplayer Game!

I am trying to make a fighting game where two characters are fighting with hands or can have some weapon in their hands. It's a multiplayer game targeting initially for mobile devices. In Game, there ...
1
vote
1answer
49 views

Prevent parent alarms to activate a child alarm event

I'm working on a small game using Gamemaker Studio 2 and I've noticed that my Parent o_enemy.Alarm[0] Is activating the Child ...
0
votes
0answers
144 views

Unity: How to use delegates with EventManager ? and use variable number of arguments in listenners?

As answered here, I would like to know how to implement an EventManager with delegate instead of UnityAction for pass arguments. I tried but I did not succeed. Also, can someone tell me if it's a ...
0
votes
1answer
547 views

Pygame set_repeat() issue

I want a single key press to result in the sending of one event in my game loop. As a toy example, if the player presses and holds LEFT, I want the sprite to move 1 pixel left and then stop until the ...
0
votes
0answers
161 views

Make UnityEvent wait for completion of method calls on listeners?

I am using the UnityEvent EventManager script from this post in one of my games. I want to know how I can make Unity wait for all the calls to methods on the listeners to finish before moving on to ...
1
vote
1answer
108 views

Handling of persistent key presses in an ECS

I'm currently in the planning phase of a game. The whole thing should be based on the entity-component-system (ECS) pattern. All logic is concentrated inside of the systems, i.e. that the components ...
0
votes
1answer
164 views

SDL - Limiting loop with timer? Not polling

I am using SDL/Glew to create an engine for a game I want to make. I am trying to set a constant framerate of like around 60 (once every 17ish ms). I don't know the best way to do this so I do ...
2
votes
2answers
422 views

LibGDX - Sending event to a button behaves differently from actually clicking it

I have a button on screen, and I want the user to be able to dismiss it by either clicking on it, or hitting space. The button is constructed as follows: ...
4
votes
2answers
258 views

Controlling two events at once using RPG Maker MV

I am trying to make a doorway that is 2 tiles high. I have created an item called, Door Key. But I want both event tiles To hide or remove when I use the ...
2
votes
2answers
268 views

How do I get a popup menu to block clicks from hitting UI elements beneath it?

You can see in the picture that I have a Canvas with a popup menu in it. I just enable this, and it covers the main menu stuff. Clicks go through it and hit stuff in the main menu. I've tried adding ...
1
vote
1answer
387 views

How to prevent clicking through object in GameMaker

I've been making my first, simple game in Game Maker. You have to click a moving ball (obj_ball), each time you click it, it wil start moving faster. I wanted to add a way to lose the game: if you ...
2
votes
2answers
3k views

Event handling in Pure Entity Component Systems, is this approach correct?

I want to ask if the following is an effective way to architect event propagation using an ECS? Here is a hypothetical collision scenario using an ECS. Components: ...
1
vote
1answer
72 views

Is there any way to use events without breaking class and component separation?

I just started using events, and got stuck a little. I have a problem with the following code: ...
0
votes
1answer
83 views

How to make a drawing action run in an left released event in Game Maker?

At first I tried to make the progress bar update using only one object that would command everything (obj_Control), linking to the ...
0
votes
1answer
2k views

Event Trigger for sprite not working

I have set up a script to set game objects as active/inactive depending on a particular number representing the index of a gameObject array. As you can see the image below. I have two buttons as shown ...
1
vote
1answer
163 views

How do I avoid big switches in my message system?

I've been implementing a message system for my small engine, and I have started to think about optimizing and maintaining it. Right now, my message class looks like this (at its simplest - only member ...
0
votes
1answer
1k views

How to display custom UnityEvents in the editor?

I recently stumbled upon the UnityEngine.Events.UnityEvent class, and it seemed pretty cool so I started using it in a project. Then I decided that I wanted to add some parameters to the event using ...
0
votes
2answers
56 views

SDL2 MOUSEBUTTONUP triggers more then once

I've been trying to figure this out all day. I'm trying to make a simple check box. But my MOUSEBUTTONUP event keeps firing until I trigger another event like moving the mouse or clicking again. <...
5
votes
3answers
201 views

Issues with events changing game state

I am currently experimenting with creating a turn based game using Unity and am trying to come up with a sensible architecture for structuring my game systems. So far I have decided to base ...
2
votes
0answers
161 views

Execution order of uGUI events in Unity?

I'm trying to understand how UI events fit into the overall Unity update loop. Specifically, I want to manually call onClick via script, and then modify the effect ...
-1
votes
2answers
100 views

How to solve this component based events response issue?

I'm working on a new game architecture and I have issues with the handling of events in our component-based approach. We have a component Match. When a match ends, an event Match_end is sent. There ...
0
votes
2answers
51 views

Finding out which Panel was clicked in function

I have a panel with 10 sub panels in it. I am using Event Trigger to intercept the messages from these sub panels OnPointerDown event calls some function in the some script of an Game Object. Is ...
3
votes
2answers
212 views

PHP Quest System: Push or Polling?

I want to build a quest system in PHP. My idea so far was to create quests based on a class and write two functions for every quest: One is checking if its activated, the other will check the progress....
0
votes
1answer
2k views

Unity - Exposing a function to the inspector

I wish to expose a script's function to the inspector, but I have no clue how to. I found something about Invoke() which was a start, but it isn't clear how to ...
0
votes
1answer
32 views

Need help solving EventHandler issue

I have an issue with my EventHandler for Key events in my game. The specifics are in this forum thread: http://www.java-gaming.org/topics/problems-with-key-event-handling/37998/view.html Basically, ...
1
vote
2answers
65 views

What is the best practice to handle event with order?

When you play card games, you always face some abilities and effects will be triggered at the same time. To resolve this, players relies on the rules. For example, if a minion dies, it triggers ...
0
votes
1answer
201 views
1
vote
1answer
593 views

How to catch basic system events (such as input) in Linux/C++

As old and as standard as Linux/C++ is now, I would imagine there's an efficient method, even a library or three, for something as elementary as catching system events. The types of events I need are ...
0
votes
3answers
170 views

How to prevent sending semantically wrong messages in event based architecture?

I have created the following architecture in C++: ReceiveMessage has two important parameters: Scope, which defines the scope, ...
1
vote
1answer
63 views

How to know which methods are associated with an event?

In Unity events are used as enhanced delegates. This is extremely helpful in developing clean concise event management scripts. ...
0
votes
3answers
146 views

Is it efficient to only store interface pointers for components in an entity-component system?

Let us say that I have a simple architecture, and I have implemented event-based communication between the objects and the components. In this architecture, Game ...
0
votes
1answer
138 views

C# Script file is not showing in Onclick Event in Unity 5.0.4f1?

I uploaded the levelLoader file to the gameobject. Still, when I drag the script file onClick Event, the no function is null. Why? Can anybody help me? C# code: ...