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 / someone...

Author
Message
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 18th Oct 2004 11:02
im trying to make it so when the timer reaches 100 it randomly selects an image clears all of the objects then displays the image but when it reaches 100 it just keep going also when it does display the image i want it to stay up for 10 seconds then go away and i want the whole program to start over at the begining does anyone know how i could apply that to this code?



anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th Oct 2004 11:15
I don't have the images to try it with but. Remember to turn the backdrop off when showing the sprite and turn it back on when hiding the sprite.

Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 18th Oct 2004 11:26
ok i still can fiqure out why it dosent show backdrop when i press spacekey it shows one of the other four

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th Oct 2004 11:41 Edited at: 18th Oct 2004 11:43
If you want to show the backdrop over the other 4 sprites you will have to either hide them or set up priorities for your sprites. After each sprite is created put set sprite priority command right after it. The higher priority makes it draw over sprites with less priority. Which is backwards from what the documentation says. You would use set sprite priority 1, 1 for the background and set sprite priority 2,2 for sprite 2.

[edit] I think I worded that first part wrong lol and since you are drawing the sprites first I don't know if it will affect the priority order. If that doesn't work try priority setting of 2 for sprite 1 and 1 for sprite 2.

Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 18th Oct 2004 11:47
ok thanks but i cant seem to find the right spot to put them in so it does it

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th Oct 2004 11:52
Ok You are making the sprite 2 the same size as sprite 1. So one will hide the other unless you make parts of one or the other transparent (black). Can you explain a bit more how you want this to work?

Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 18th Oct 2004 12:12 Edited at: 18th Oct 2004 12:16
um well when the spacekey is pressed i want my sprite of a cell to come up in front of my models and when the timer reaches 100 i want all of the models cleared the timer reset and it to randomly pick one of the four sprites from the list display it for like 10 seconds then i want it all to start over again

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th Oct 2004 13:44 Edited at: 18th Oct 2004 14:52
Any chance you can email me the images or post them here? I'm still not understanding why both sprites are full screen.

[edit] Actually I'm still not understanding alot of it. Ok. Could you go step by step telling exactly how you want the program to work from execution to end?

Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 19th Oct 2004 01:21 Edited at: 19th Oct 2004 01:22
go to www.admiralgames.uni.cc/biologyss.zip to get the prog.

begining:
the cells in the program reproduce and go about the screen. when you press the spacebar the photo of the cell should come up. after 100 seconds on the timer everything is supposed to go away (all of the models) then the program should randomly pick a picture of the other four animals/human. then the whole program should reset and do it all over again until you move the mouse just like a screen saver
End

i hope that explains it some more to you

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Oct 2004 03:40 Edited at: 19th Oct 2004 03:42
Ok so you want it to display the cell behind the models (like a background) when the spacebar is pressed. And if you release the spacebar do you want the cell background to disappear? And then after 100 secs pick a new back ground but you want it to stay behind the models regardless of the spacebar is pressed or not. And remove all cells and start over.?

[edit] I'll have a look when I get off work. I'll make a fully commented code to do as close to what you want as possible so you can learn from it.

Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 19th Oct 2004 06:51
thanks so much man

anyone can be a hero, but a soldier can be a hero five minuets longer....
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 19th Oct 2004 11:27
i just wanted to ask something in the darkbasic pro trial does it implement all of the commands?

anyone can be a hero, but a soldier can be a hero five minuets longer....
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 19th Oct 2004 12:38
oh and thanks

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Oct 2004 13:25
Yes it has most of the commands. The only ones missing are the expansion pack commands that DBP retail owners get like advanced terrain. I think.

Had to work late but it shouldn't take long for me to make a small code for you.

Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 19th Oct 2004 13:30
oh ok thanks

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Oct 2004 13:42
Here you go. I just modified your code for faster progress. It might be over commented. If you have any questions or it doesn't act like you want it to ... try to see if you can change it. If you need help after you have studied the code and tried just ask here and I'll help anyway I can.


Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 20th Oct 2004 01:22
ok i just want to ad one thimg would i do this...

if i want the image to stayy for a while then go away because the frog,human,snake,squirel images dont go away so you cant see that cell image so would i put that in there?

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 20th Oct 2004 02:06 Edited at: 20th Oct 2004 02:08
I'm not sure what you want but try putting this in the main loop.



Like :


Login to post a reply

Server time is: 2024-09-23 03:21:35
Your offset time is: 2024-09-23 03:21:35