Top-down enemy collision?

For questions about using Classic.

Post » Mon May 12, 2008 3:46 pm

[quote="Robink93":1lwmjgzy]And :oops: , the 3D boxes uses only the "Right Face" one, so there's windows on the roofs >_< is this a bug or something?[/quote:1lwmjgzy]
Yep its a bug, it should be fixed in the next release.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Mon May 12, 2008 11:57 pm

Doppel to the rescuuuuuuueeeee!!

Hey just in regards to the timer question... I haven't tried it yet, but can you compare the timer to a random rolling value? So instead of every 5 seconds it could be every 5 seconds +- random value between say 1-3?

Just wondering how to generate a random number in other words...
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue May 13, 2008 12:48 am

@SoldjahBoy- lol and to create random value there is random(x) funtion which apparently generates a random number from 0 to x, so in order to have random time respawn we have to change a little the event.

[color=#008040:3obnu8lm]"Every 2000+1000*random(1)+1000*random(5) miliseconds" -> "System: Create object Zombie on layer 1 at (x,y)"

in before question why random(1)+random(5) becouse i dont know if random have some kind of number limits so it will go as it.[/color:3obnu8lm]

Edit: The green text is heresy... now it should go like this

"Every 2000+1000*random(7) miliseconds" -> "System: Create object Zombie on layer 1 at (x,y)"

Becouse number 1 is new 0 in construct =D
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue May 13, 2008 2:19 pm

http://ninjasvspiratesgame.googlepages.com/index
Download there.

When it's about 20 monsters in the game total, it's lagging like crazy! Why? :(
B
2
G
4
Posts: 20
Reputation: 1,090

Post » Tue May 13, 2008 2:27 pm

Its laggin probably becouse the construct engine is not optimized.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue May 13, 2008 2:31 pm

[quote="Doppel":qldgl2gh]Its laggin probably becouse the construct engine is not optimized.[/quote:qldgl2gh]
Then it's not gonna be a "I am Legend" moment :cry:

EDIT:

How should it come a stream of monsters all the time then?
B
2
G
4
Posts: 20
Reputation: 1,090

Post » Tue May 13, 2008 5:07 pm

The 'move to' actions in the RTS movement run a fairly CPU intensive search algorithm to generate the shortest path to the destination. I need to see the .cap to be able to tell, but my best guess is you're running the 'move to' action constantly over and over again, which means its running thousands of pathfind algorithms every second. You only need one 'move to' action and they will generate a path and move along it - otherwise, if you want to reach a moving target, use a 'move to' once every second or few seconds, to keep CPU usage down.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed May 14, 2008 3:37 pm

[quote="Ashley":179tfbo7]The 'move to' actions in the RTS movement run a fairly CPU intensive search algorithm to generate the shortest path to the destination. I need to see the .cap to be able to tell, but my best guess is you're running the 'move to' action constantly over and over again, which means its running thousands of pathfind algorithms every second. You only need one 'move to' action and they will generate a path and move along it - otherwise, if you want to reach a moving target, use a 'move to' once every second or few seconds, to keep CPU usage down.[/quote:179tfbo7]

Sorry, can't post it. This comes up everytime i load it :(
Error with loading: expecting class (CObj), but recieved (bj)
So now i can't work on this no more.
B
2
G
4
Posts: 20
Reputation: 1,090

Post » Wed May 14, 2008 5:34 pm

Can you remember what you did before the error came up?
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed May 14, 2008 7:47 pm

Saved and exited? :roll:
B
2
G
4
Posts: 20
Reputation: 1,090

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests