How do I make text loop?

Get help using Construct 2

Post » Sat Sep 26, 2015 3:31 am

I'm working on a survival horror game that has very limited graphics, relying on sound, and text instead. Its sort of like a hybrid of text adventure, and graphics, in that there are graphics to display where you are, almost like a zoomed in mini map - but each and every 'animation' or, 'environment' is relayed through text instead of visual stimuli. I want it to be something of a horror game with action elements that rely on the imagination.
How I achieve this is by pinning text to both an enemy and player close so that it won't be too distracting from action. Basically, you can focus on the action in real time, and read about what the enemy is doing, and so on.

The text appears based on timing, and button prompts. For an example, when shift is held, above the player text says, 'You raise your weapon.' and you're player will slow down in speed leaving you vulnerable. If it is released, it says, 'You put you're weapon away.'
So, all this is fine and dandy, and above the zombie similar text presents every 5 seconds.
So, like, 'Theirs a glimmer of hate in its vacant bleeding eyes.'
and, 'A open sore shows maggots squirming.'
I've written three, and I want to write more to give it more variety. But, the problem is, I have no idea how to loop the 'animations' (Descriptions, really. :P)
I've played around with loops but it just makes the text look as if its having a mini stroke.
I simply want the text actions to repeat. Randomize, preferably, but I'm not so much focusing on that currently.

UPDATED: Forgot to mention that I'm relatively new to construct 2. I acknowledge that its super easy so far. Seriously impressed by how everything runs and how user friendly it is. Especially to newbs. But, I would still appreciate it if its explained step by step to me. Or, in child talk. Basically, just pretend I know nothing.

Thanks.
B
7
S
2
Posts: 33
Reputation: 591

Post » Sat Sep 26, 2015 5:54 am

at @justintime0185

set up a global variable

global (textCounter)

then set a group of events like this...



if textCounter is 1 then set "enemy text to "come , sit next to me"
wait 5 seconds
if textCounter is 2 then set "enemy text to "I love you"
wait 5 seconds
if textCounter is 3 then set "enemy text to "lets dance"
wait 5 seconds
if textCounter is 4 then set "enemy text to "what kind of car do you drive?"
wait 5 seconds
if textCounter is 5 then set "enemy text to "I give up"
wait 5 seconds


then create a random string like so...



[every 5 seconds] system set textCounter to RANDOM(5)



This will bounce threw your text displays randomly every five seconds setting it to a different text
Image
B
26
S
4
G
3
Posts: 147
Reputation: 4,875

Post » Sat Sep 26, 2015 6:20 pm

Thanks a lot! I will give it a try later.
Man I love how simple this is than coding a language that takes a while to understand. May buy a license when I want to put something on android.
B
7
S
2
Posts: 33
Reputation: 591

Post » Sat Sep 26, 2015 6:26 pm

No prob bro!


Halla at me if you do, I have a complete tutorial on a android build
Image
B
26
S
4
G
3
Posts: 147
Reputation: 4,875

Post » Sat Sep 26, 2015 6:47 pm

cant seem to find 'System: Set TextCounter' I made sure it was a global variable.
B
7
S
2
Posts: 33
Reputation: 591

Post » Sat Sep 26, 2015 6:49 pm

I have 'Add to', 'Reset global variables', 'Set value', and 'Substract from' all of which don't let me choose my TextCounter.
B
7
S
2
Posts: 33
Reputation: 591

Post » Sat Sep 26, 2015 7:07 pm

tried it with a instance variable too. No luck.
B
7
S
2
Posts: 33
Reputation: 591

Post » Sat Sep 26, 2015 7:07 pm

Will try again later.
B
7
S
2
Posts: 33
Reputation: 591

Post » Sat Sep 26, 2015 7:21 pm

Use (set value) then select the global var
Image
B
26
S
4
G
3
Posts: 147
Reputation: 4,875

Post » Sat Sep 26, 2015 7:36 pm

Are you using a timed event?
Image
B
26
S
4
G
3
Posts: 147
Reputation: 4,875

Next

Return to How do I....?

Who is online

Users browsing this forum: max2612 and 33 guests