Respawn Array Enemies using real time countdown.

Get help using Construct 2

Post » Sun Sep 20, 2015 12:13 am

On start of layout...you have a empty Array..
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Sun Sep 20, 2015 12:24 am

korbaach wrote:On start of layout...you have a empty Array..


I need to create another start of layout under the array event?

Image
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Sun Sep 20, 2015 12:40 am

you need to move event "For each X element"..
..after you load Array from Json or Local Storage...substact time...

another thing...

I see only zeros et "Cur.X,6"...and you have a condition.... if Value at Cur.X,6>1....
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Sun Sep 20, 2015 12:51 am

korbaach wrote:you need to move event "For each X element"..
..after you load Array from Json or Local Storage...substact time...

another thing...

I see only zeros et "Cur.X,6"...and you have a condition.... if Value at Cur.X,6>1....


I want subtract the away time one time only when the player opens the game, i cant move the event outside the start of layout because if i do this then i cant countdown the time values in the array, i tried to create another start of layout event but didn't worked, i cant subtract the away time, the only way that this worked if is i put the event outside start of layout but the event subtract the away time all the time and this is not the intentions.

You only see zeros but they aren't zeros because i have another event that countdown time values inside the array.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Sun Sep 20, 2015 1:06 am

I'm sorry I do not know how to help you....


Image

event "For each X....." simply can not be executed..because "on start of layout" you do not have "Cur.X,6"...
...you do not have "Apples","Oranges","Bananas" ..
..just a empty array
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Sun Sep 20, 2015 1:12 am

korbaach wrote:I'm sorry I do not know how to help you....


Image

event "For each X....." simply can not be executed..because "on start of layout" you do not have "Cur.X,6"...
...you do not have "Apples","Oranges","Bananas" ..
..just a empty array


Yes thank you! , i notice this and i tried to fix it, i just want to run this subtract thing 1 time when the player opens the game, i don't if this is the good way to do this:

Image

UPDATE: Now its working in this position, i just add tigger once!!!! thank you so much!!!!!!!!!!!!
Last edited by Majinboo on Sun Sep 20, 2015 6:15 am, edited 3 times in total.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Sun Sep 20, 2015 5:35 am

Thank you for your help! now its working! , after several hours of trying i solved the loops issues, Your capx examples in other threads saves me a lot! ;) , thank you all for helping me in this thread, without you guys I would have given up weeks ago.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Mon Sep 21, 2015 5:48 pm

Remember KISS! Keep It Simple Stupid. (Not calling you stupid, that is actually what this acronym stands for)

If you use rex_time or rex_date, it pulls that time from the players local system clock, which means that they can manipulate the clock to hack your game, like this: https://www.youtube.com/watch?v=WyDNDIiQfWA

Games are complicated enough to make, you should always be looking for the easiest, simplest, and stupidest way to do things. Like my mentor said: "I know my code is stupid, but it works."
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Mon Sep 21, 2015 10:29 pm

gumshoe2029 wrote:Remember KISS! Keep It Simple Stupid. (Not calling you stupid, that is actually what this acronym stands for)

If you use rex_time or rex_date, it pulls that time from the players local system clock, which means that they can manipulate the clock to hack your game, like this: https://www.youtube.com/watch?v=WyDNDIiQfWA

Games are complicated enough to make, you should always be looking for the easiest, simplest, and stupidest way to do things. Like my mentor said: "I know my code is stupid, but it works."


I know, but i am not programmer, ironically the KISS way to make my game its using rex time plugins otherwise i cant make my game lol.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Wed Sep 23, 2015 4:20 pm

Yea, but the same principles still apply. And you are becoming a programmer simply by working with C2.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Previous

Return to How do I....?

Who is online

Users browsing this forum: lolsuperscratch, RobertMKD, tarek2 and 9 guests