Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need help spawning objects as time goes

Author
Message
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 3rd Nov 2009 18:43
I am making a game, loosely based upon the Dodge Game tutorial.
What I want is a new ball spawn when a certain score is reached, but I cant get it to work.

I dont want anyone to write a code for me, but I do want some pointers so I can solve this myself.

Thanks.

Here is how my game look for the moment:

(Physics! )

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 3rd Nov 2009 19:46 Edited at: 3rd Nov 2009 20:08
how are you currently trying to trigger the spawns? it should be something as simple as checking a variable, say NextSpawn, which you would initialize at the start of each level and check each time the player scores and update appropriately. pseudo:



hope that helps

edit: you stated "as time goes" by in the title so just incase you want the score AND the time to dictate when the next ball spawns:



i know you asked for "no code" but i think this pseudo explains it best.

by the way, the screenie looks nice!

wanted to add that the code above adds the increment to the CurrentScore and i don't know your scoring system (ie, if the score can exceed the trigger score or not, hence the "=>") but if you wanted it to trigger, say every 10 points, you could change the line:



to




Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 3rd Nov 2009 20:16
Thanks for your help!
But I did actually find a solution myself, similliar to your first codesnippet.

Here:


With a variable which is "ball3 = 0"

This one works great

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 5th Nov 2009 14:12 Edited at: 5th Nov 2009 16:26
Insteas of creating a new thread I write here:

Is there any way to attach particles (dark Physics) to another object, like the player?

And is there any easy way to add a fullscreenshader to DarkBasic?
I want to add the cartoonshader from DarkShader.

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Nov 2009 12:51
Quote: "Insteas of creating a new thread I write here:"


You should start a new thread.

The forum search feature searches on thread titles so if you did get an answer here, it's unlikely anyone else with the same problem would find the solution.

TDK

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 13th Nov 2009 18:47
Will do so.
Over in the FPSC board its quite strict, if you have two active threads on the first page people start to get mad at you

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 16th Nov 2009 03:38 Edited at: 16th Nov 2009 03:38
The FPSC board to me is a completely different planet with different inhabitants... and rules to match.

We don't normally venture there unless we really have to.

We're quite civilised this side of the wall...

TDK

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 16th Nov 2009 15:21
Great to hear

Login to post a reply

Server time is: 2024-09-28 12:27:42
Your offset time is: 2024-09-28 12:27:42