[SOLVED0] How do I Setting for Purchase variable

Get help using Construct 2

Post » Wed Sep 14, 2016 12:25 pm

pls check my purchasing system if it is wrong

image
Image
Last edited by luckyrawatlucky on Fri Sep 16, 2016 6:47 am, edited 1 time in total.
Image
B
72
S
41
G
48
Posts: 687
Reputation: 34,290

Post » Wed Sep 14, 2016 4:46 pm

So far from what I observed, it seems there are few errors and confusion here....

1. If RandomAdvt is equal/more than 5 you are making it 0
When player dies and if its not the 5th time, RandomAdvt will be 6
That means it will go back to 0

And when the 5th life ends, it will add 1 to RandomAdvt
Error Result = RandomAdvt will always be 0 or 1
Possible solution = Remove Else

2. You have given 2 impossible conditions :
RandomAdvt =1 and RandomAdvt =4
Error Result = Not possible
Possible Solution = Put "or" in the middle

3. I find no reason to make RandomAdvt set to 6 on different places
Cause it will eventually become 0
B
9
S
2
Posts: 77
Reputation: 741

Post » Thu Sep 15, 2016 4:45 am

signupdemo wrote:So far from what I observed, it seems there are few errors and confusion here....

1. If RandomAdvt is equal/more than 5 you are making it 0
When player dies and if its not the 5th time, RandomAdvt will be 6
That means it will go back to 0

And when the 5th life ends, it will add 1 to RandomAdvt
Error Result = RandomAdvt will always be 0 or 1
Possible solution = Remove Else

2. You have given 2 impossible conditions :
RandomAdvt =1 and RandomAdvt =4
Error Result = Not possible
Possible Solution = Put "or" in the middle

3. I find no reason to make RandomAdvt set to 6 on different places
Cause it will eventually become 0


oh yes I was just forget to set or condition between both
secondly I have also try
when die =5
trigger once then choose(0,1,2,3,4,5) to RandomAdvt
Else set RandomAdvt to 6
But first I am going to try putting or between then
if any problem comes
I'll come here

Purpose of RandomAdvt = 6 is
when video finished another video comes again and then again so on
Image
B
72
S
41
G
48
Posts: 687
Reputation: 34,290

Post » Thu Sep 15, 2016 10:33 am

I put or in both condition and removed else
but still advt is not showing
only banner is showing which i have set on the startup
Image
B
72
S
41
G
48
Posts: 687
Reputation: 34,290

Post » Thu Sep 15, 2016 11:03 am

Whenever you are starting your layout, RandomAdvt is set to be equal to 6.
In the very next event, it is set to be equal to 0.

On start of layout will execute every time you execute/start your layout.
So a "Go to layout" and a "Restart layout" will execute this loop and skip the whole part that checks if RandomAdvt value is between 1 and 5, because it simply never is.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,298

Post » Thu Sep 15, 2016 11:25 am

I have put a text in the layout to watch
how my die and which RandomAdvt no is trigger
that is working fine
startup RandomAdvt= 6
on each die
die is adding 1
when die become 5, then RandomAdvt become = 1 and here i have put a restart button
interstitial should come here but nothing happen
i tap restart die become 1 and RandomAdvt = 6 again
<instead of adding 1 to each die i am doing choose(0,1,2,3,4,5) to RandomAdvt >
Image
B
72
S
41
G
48
Posts: 687
Reputation: 34,290

Post » Fri Sep 16, 2016 6:47 am

I have removed last three event 154,155,156
Now advts are showing perfectly
Image
B
72
S
41
G
48
Posts: 687
Reputation: 34,290


Return to How do I....?

Who is online

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