Help needed with experience triggered events

Get help using Construct 2

Post » Wed Mar 04, 2015 5:13 pm

Hello all,

I am still very new to C2 and have a question.

I have a layout representing a planet and for the player to leave this planet he needs a flying skill of 5. I have a global variable called "Flying"

In the layout is a flightschool button ("LearnToFlyButton") with the following event:
Mouse->On left button clicked LearnToFlyButton->

Followed by the following two actions:

System->Add 1 to Flying
FlyingText-> Set text to "Flying skill: " & Flying

And I have a Textbutton "Depart planet" ("DepartButton") with the following (incomplete) event:

Mouse->on left button clicked DepartButton ->System-> go to Galaxy Layout***

*** Now the player should only be able to depart the planet once his flying skills reach 5 and only then "Go to Galaxy Layout" action should happen. But I'm lost at the monent...

QUESTIONS:
1) What does my Event sheet need to make this happen? What I would like is that, when clicking on the 'Depart Planet" button and the player's flying skills are LESS than 5, it should give like an error-message aswell.

2) I would like to add triggers that set off when the player reaches e.g. flying skill 50, 100, 200 enabling him to do new things due to increasing experience. What do I need for this?

Thanks you very much for your time and help, Regards from the Netherlands.
Rizzo
B
6
Posts: 15
Reputation: 280

Post » Wed Mar 04, 2015 5:41 pm

Events can have more than one condition. So the value of Flying becomes an additional condition required to trigger the event... and then you can have an "Else" that gives a "your flying is too low" message if their skill isn't high enough. :)
B
6
S
1
G
1
Posts: 91
Reputation: 900

Post » Wed Mar 04, 2015 5:51 pm

Thank you for replying Televangelist.
Could you please clarify that with an example?

Thank you so much,
Rizo
B
6
Posts: 15
Reputation: 280

Post » Wed Mar 04, 2015 7:13 pm

Mark the event "Mouse->on left button clicked DepartButton ->System-> go to Galaxy Layout***" and press C on your keyboard to add another Condition. Go to System, campare variable "flying skills > 5"

Then mark that event and press X on your keyboard to make an else event and do whatever you want to there
B
11
S
4
G
2
Posts: 116
Reputation: 1,936

Post » Wed Mar 04, 2015 8:24 pm

Thanks for clarifying Detteman,

I was able to add the" flying skill greater/equal to 5" condition which enables the player to leave the planet
but after that it won't let me add an else event

I tried to come up with an alternative and made a second event but now with a "flying skill lower than 5" condition attached. In the attached action I show a text-message saying that 'flying skills are too low'. Problem now is that this message won't dissapear once I hit a flying skill of 5.

Any idea why it wouldn't let me add an 'else'? Again here is the event:

Mouse-> On left button clicked BUTTON-> Go to Galacy Layout
System-> Flying >5 (=Second condition in same event)
B
6
Posts: 15
Reputation: 280

Post » Wed Mar 04, 2015 9:15 pm

I think I got it working, but I'm not sure if it's 'pretty';

Event #1:
System-> Flying <5 -> BUTTON-> set text to "To depart planet, first raise your flying skills to 5"

Event #2:
System-> else -> BUTTON -> Set text to "Click to visit another planet"

Event #3:
Mouse-> On left button clicked on BUTTON -> System -> Go to Galaxy Layout
System -> Flying (Greater equal then) 5 -> (= this is the second condition of event #3)

Am I on the right track?
B
6
Posts: 15
Reputation: 280

Post » Thu Mar 05, 2015 6:05 pm

Sorry! Of course you cant add an else to that condition. What you should do is create an event with sub-events. Something like this:

Condition - Button pressed
sub-event - flying skill >= 5 - Do this
sub-event - flying skill < 5 - Do that (or you can make THIS an 'else')

All this will be in one event.
To add a sub-event just mark the event and press S. Or right click on the event and choose sub-event.
B
11
S
4
G
2
Posts: 116
Reputation: 1,936

Post » Sat Mar 07, 2015 10:52 am

Got it working, thanks!
B
6
Posts: 15
Reputation: 280


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests