Need some help with points and paths (TyranoBuilder)

basium

Member
Game Developer
Feb 22, 2017
186
769
(TyranoBuilder)
I can't get this super simple thing to work. I just want the game to give you a game over if you don't have enough points. or to continue as normal if you have those points

I have a variable called PlayerPoints. It starts at 0 but can go up to +21 or down to -21
Depending on your choices in the game

I've come to a point where I want the game to count your points..
If you have 14 or below it will send you to the game over scene
If you have 15 or above it will send you to the continue scene.

Everything is set up but those points are driving me insane. I have tried different solutions following the outdated guide at tyranobuilder.co m
But it wont work right. Somtimes it sends you to game over if you have 15, sometimes 17.
The more I mess with it the worse it gets lol

How do I do it?
 

TCMS

Quote my posts if you want an answer
Donor
Former Staff
Aug 5, 2016
5,797
29,928
Post the code you have? o.0
 

basium

Member
Game Developer
Feb 22, 2017
186
769
I dont have any code for it right now. I deleted all.
But for example i could use a jump to a label with these conditions:
A: PlayerPoints
B: Value 15. A>B

I think i've tried all of those conditions without any good reliable results
 

Egglock

Member
Oct 17, 2017
196
110
Have you tried an elseif statement?

Pseudo code

If PlayerPoints <= 14 send to game over screen
else
PlayerPoints >=15 send to continue screen
 

basium

Member
Game Developer
Feb 22, 2017
186
769
Those are in tyranoscrip right?
I think I got it working by using 3 jumps.
first jump is: Value 15 A=B
Second is: Value 15 A>B
Last jump have no conditions and sends you to the game over scene.
The first 2 jumps send you to the continue scene

So far it has worked with different numbers
 

Egglock

Member
Oct 17, 2017
196
110
Ah my apologies, I jumped the gun and didn't give much thought into how tyranobuilder handles it's scripting. What I mention above is a pseudo code, since I'm unfamiliar with how tyranoscript works I can't really translate that into something that would work with the engine, but in short it's basically doing a variable check.

If condition A is true do something
otherwise check
If condition B is true do something

Another note check this link


is this something along the lines of what you're looking for?
 

basium

Member
Game Developer
Feb 22, 2017
186
769
Thanks!
That's exactly the kind of variable check i wanted to get and that guide tells how to kinda. But by following it I got those results that made me go cocooo :p

I'm no coder and just can't remember long enough to become a coder haha
But it's all good since I think I managed to get it to work with the "visual coding" tools inside tyrano