Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:events [2019/06/21 12:46]
piyushpalawat99
gdevelop5:events [2019/08/16 07:27] (current)
4ian
Line 1: Line 1:
 # Events # Events
 {{ :​gdevelop5:​event-screenshot.png?​nolink |}} {{ :​gdevelop5:​event-screenshot.png?​nolink |}}
-Events in GDevelop allow you to visually program ​your game without ​any prior programming knowledge ​or experience, so anyone with any background will be able to create the actual gameplay and allow players to interact with the game+Events in GDevelop allow you to create the logic that is running ​your game. Events are readable by anyone and can be authored ​without ​advanced ​programming knowledge.
  
 Even for experienced programmers,​ events are fast to write and read. They allow artists, designers, level designers and anyone working on the game to understand and update the rules of the game. Even for experienced programmers,​ events are fast to write and read. They allow artists, designers, level designers and anyone working on the game to understand and update the rules of the game.
Line 7: Line 7:
 ==== Event types ==== ==== Event types ====
  
-There are different ​type of events in GDevelop ​that can be used for different purposes:+There are different ​types of events in GDevelop:
   * [[gdevelop5:​events:​standard|Standard event]]: this event is the default one and is triggered every single frame. It executes the actions once the conditions are true, then moves on to the next event.   * [[gdevelop5:​events:​standard|Standard event]]: this event is the default one and is triggered every single frame. It executes the actions once the conditions are true, then moves on to the next event.
   * [[gdevelop5:​events:​foreach|For Each event]]: this event is triggered for each and every instance of the selected object, ​ checks the conditions, and then executes the actions for each individually before moving to the next event.   * [[gdevelop5:​events:​foreach|For Each event]]: this event is triggered for each and every instance of the selected object, ​ checks the conditions, and then executes the actions for each individually before moving to the next event.
Line 46: Line 46:
  
 You can also create your own conditions and actions using [[gdevelop5:​events:​functions|functions]]. You can also create your own conditions and actions using [[gdevelop5:​events:​functions|functions]].
 +
 +==== Move events ====
 +Unlike copying, when you move an event, its position is changed rather than being duplicated to a new position. This can be done by right-clicking on the event to be moved and selecting the "​Cut"​ option. This will remove the event from the events sheet.
 +
 +To paste the event, right-click on the event above which your event should be pasted and select the "​Paste"​ option.
 +
 +{{ :​gdevelop5:​event_cut_paste.gif?​nolink |}}
 +
 +Another way to move an event is by simply drag-and-dropping the blue bar on the left side of the event in the vertical direction.
 +
 +{{ :​gdevelop5:​drag_n_drop.gif?​nolink |}}
 +
 +This method also allows you to move a standard event as a sub-event. For this, drag-and-drop the event below the desired parent event of your sub-event and move the event to the right side.
 +
 +{{ :​gdevelop5:​drag_n_drop_subevent.gif?​nolink |}}
 +
 +==== Move conditions/​actions ====
 +You can move conditions/​actions such that they are removed from the event they were originally in, and moved to the event they are desired to be in.
 +
 +You can move a condition/​action by right-clicking on it, and then choosing the "​Cut"​ option. To paste it, right click on the "Add condition"​ or "Add action"​ option in the desired event and choose the "​Paste"​ option.
 +
 +{{ :​gdevelop5:​action_cut_paste.gif?​nolink |}}
 +
 +<​note>​Some features might be supported both, as a condition as well as an action. For example, "Pick a random object"​ or "Pick all objects"​ are present as a condition as well as an action.</​note>​
 +
 +You can also move the condition/​action by drag-and-dropping it from the current event to the desired event. While drag-and-dropping,​ the new position of the condition/​action will be denoted using a black bar in the events editor.
 +
 +{{ :​gdevelop5:​action_drag_and_drop.gif?​nolink |}}
  
 ==== Search/​Replace in the event editor ==== ==== Search/​Replace in the event editor ====
 Sometimes, searching for an event in the event sheet can be cumbersome. For this, you can use the search feature. To search within the event sheet, you can either click on the "​Search in events"​ button {{:​gdevelop5:​search-button.png?​nolink|}} or press Ctrl + F. Sometimes, searching for an event in the event sheet can be cumbersome. For this, you can use the search feature. To search within the event sheet, you can either click on the "​Search in events"​ button {{:​gdevelop5:​search-button.png?​nolink|}} or press Ctrl + F.
  
-To search for a keyword, enter the keyword in the search bar at the bottom of the window and click on "SEARCH".+To search for a keyword, enter the keyword in the search bar at the bottom of the window and click on "Search".
  
 {{ :​gdevelop5:​annotation_2019-06-21_145733.png?​nolink |}} {{ :​gdevelop5:​annotation_2019-06-21_145733.png?​nolink |}}
Line 64: Line 92:
 {{ :​gdevelop5:​annotation_2019-06-21_154925.png?​nolink |}} {{ :​gdevelop5:​annotation_2019-06-21_154925.png?​nolink |}}
  
-To replace the instances of a text with another text, enter the text to be replaced in the "Text to search"​ field and in the "Text to replace"​ field, enter the new text. Clicking on the "REPLACE" button will replace all the instances of the text in the search field.+To replace the instances of a text with another text, enter the text to be replaced in the "Text to search"​ field and in the "Text to replace"​ field, enter the new text. Clicking on the "Replace" button will replace all the instances of the text in the search field.
  
 {{ :​gdevelop5:​annotation_2019-06-21_160842.png?​nolink |}} {{ :​gdevelop5:​annotation_2019-06-21_160842.png?​nolink |}}