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.

DarkBASIC Professional Discussion / Poison Mushroom acting odd

Author
Message
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 18th Nov 2012 00:35 Edited at: 18th Nov 2012 06:28
I am trying to put in poisonous mushrooms in my game. I have put in water melons just fine, loading the object off of anim8tor and everything. But! When I do the same thing for mushrooms it goes all haywire.



So, this is how I input the watermelon and make the score. Everything works perfectly fine, I did the same thing with a superfruit. But why do I get a problem when I try adding mushrooms? It constantly tells me it either already exists (which it doesnt) or the object cant be found. I cant put it in a for next loop to make 20 of them randomly like the watermelons. Does anyone know the answer?

This is the code to the mushrooms

tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 18th Nov 2012 06:15
You are not using a number wheel for your mushroom objects, but you are for your fruits. You are only using object reference #101 and it is within a FOR..NEXT loop. Do the same thing with mushrooms that you are doing with other objects via "t+NumberOfFruits".

Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 18th Nov 2012 06:39
I tried that and it says that the object already exists which puzzles me. I changed the code to this



Why does it say the object already exists?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Nov 2012 07:48
Because 1-20 was already used for your fruits. You'd have to use 21 through 40 for your mushrooms.

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 18th Nov 2012 21:30 Edited at: 18th Nov 2012 22:30
Wow thank you! It works great but I have another small question.
When you grab the mushroom, I wanted to make the player's texture a certin picture for a brief moment, halt the players movement and have a timer that says "POISONED" when the timer is over the original texture should be placed back on. So far I have this



It doesnt seem to work. What is the problem?
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 19th Nov 2012 06:55 Edited at: 19th Nov 2012 06:59
Im assuming you have used a sync rate command in your code somewhere and you would then need to call sync for the changed texture to show up


But without seeing the rest of code its hard to say
Post up what you have and ill take a look when i get some time
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 19th Nov 2012 07:31
Actually no I dont have a sync rate command for this mind helping me out?
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 19th Nov 2012 07:44
Post up the whole of the code,i dont need the media,and ill take a look for you.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 19th Nov 2012 07:53
(facepalm) it wont let me. It's saying that there is profanity in my code somewhere. If you can give me an email I'll happily email the code to you.
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 19th Nov 2012 10:01
Never had that happen,have you tried just attaching the *.dba file with the "choose file" button at the bottom left of the post message box or did you try and paste it in as with your posts above?
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 19th Nov 2012 21:32 Edited at: 20th Nov 2012 00:51
my first experience re: the profanity filter was regarding some code to mark a flag when an object "is hit". of course, the natural name of the flag would be a combination of the 2 words into 1, which the forum didn't care for at all.

option: find and replace "suspect language" within your code to IsItHit or something similar

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 28th Nov 2012 02:53
I'm sorry, but no matter how many changes I do to this code the profanity filter still acts up, please give me an email address so I can just send you the code as a word document.
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 28th Nov 2012 10:22
As far as i know there is no profanity filter when you simply attach the file with the "choose file" button on the bottom left of the post forum message box,you can attach any type of file you like,but if you want any one to take a look at your code the just the *.dba would be what you need to attach,or zip up the whole project in a folder including the media needed and attach that.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 29th Nov 2012 16:37
Here it is. Now the problem I'm having is the countdown timer that says "POISONED" and halts your movement for 3 seconds. I got the timer to work but to doesnt stay on the screen, it flashes once only. I also want it to stop the movement of the character. I tried a lot of ways to make this work but I couldnt find the correct code. I appreciate any help!
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 29th Nov 2012 18:00
Without all the media its a bit hard to test but try replacing your bad fruit collision code with this and let me know.

As for the rest of the code,8 gosubs and not a single matching return command,if i where you i would break this down into small reusable chunks or read up on how to use "functions" something like this

It would make things so much easier to keep track of and fix problems
Hope this helps,and keep trying,the collision code is quite good,if this is your first attempt at something like this then its a good start.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 29th Nov 2012 19:31
I cannot thank you enough Paul, you've helped me a lot with these codes. I love it!
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 29th Nov 2012 22:01
Thank you Silence,only too happy to help.

Login to post a reply

Server time is: 2026-07-07 05:39:26
Your offset time is: 2026-07-07 05:39:26