A
A
ArsSacra2015-01-18 11:20:47
ruby
ArsSacra, 2015-01-18 11:20:47

Ruby language, single loop or how to create an updatable event?

Help comrades please, I've been racking my brains for the third day. Tell me how to create a loop in the Ruby language that will work only once, after being removed. And the essence is this - there is an event that is created on the map, it is necessary for the player to step on it and it is lost - while the event is not deleted, and the text that appeared is lost only once, the next time the player steps on - the script will be played but on a new one . Engine - RPG MAKER VX ACE.
The player stepped - Monologue - the player left, returning came - another monologue (but only if the switch is activated)
Here is such a task. My programming level is Padawan, I know the basics of c++ and ruby ​​but it's a bit tight)
PS I think it's better to look at the engine and experiment, otherwise I will be loaded with code that simply may not go to the engine due to personal libraries. Thanks in advance, comrades, I will be very grateful if you help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
neck_varentsov, 2015-01-24
@neck_varentsov

For example, create a boolean variable that, after the loop is completed, takes the value true.
And before the loop, check this variable, if it is true, then the loop is not executed, or it is executed but another

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question