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 / Value repeat stop?

Author
Message
Mugen Wizardry
User Banned
Posted: 12th Jan 2011 22:21 Edited at: 12th Jan 2011 22:22
Hi all. I have some code that sets the value of my spinners in my game.

Now. What I WANT it to do, is when _picked is > 0 and the "Scale" checkbox is active, then set the values of the 4 spinners to the size of the object that is picked by _picked.

The PROBLEM is, I would like to use a boolean for each set spinner code to stop it from repeating set spinner over and over and over.



this is in the main loop

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 13th Jan 2011 00:38
Anyone? :/

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 13th Jan 2011 00:52
Ok, this one is simple. I suggest trying everything you possibly can before making a thread asking for help. If you still can't do it, research. If your still stuck, only then you should ask for help.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Mugen Wizardry
User Banned
Posted: 13th Jan 2011 05:03
i have no idea.

the boolean things are much more difficult for me than variables.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 13th Jan 2011 05:08 Edited at: 13th Jan 2011 05:09
Plus. I'm the one who wrote the code. I have a right to ask about it. Not arguing. just saying.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 13th Jan 2011 07:22
What do these "X ..." functions/commands do?

Can you not create some code we can actually compile to edit and test for you?

I really hate to repeat myself...

Also what is a spinner?

I'm not sure you understand that we cannot see inside your mind or your friend's plugin.

Help US to help YOU.

Not being nasty here just repeating myself (and other people).

SH4773R
16
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 13th Jan 2011 07:36
What sasuke is saying is you'll probubly find the awnser to your question faster if you attempt to solve it your self.
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 13th Jan 2011 08:19 Edited at: 13th Jan 2011 08:23
Quote: "Plus. I'm the one who wrote the code. I have a right to ask about it. Not arguing. just saying."


I'm sorry, but in that code, there is no evidence of you trying to stop the variables being set, you haven't even talked about anything you've tried. Quoting you:

Quote: "The PROBLEM is, I would like to use a boolean for each set spinner code to stop it from repeating set spinner over and over and over."


Well if you'd like to, then do it, have a bash at it at least before asking for help. I'm not having ago but you need to at least try to solve it. For instance your other thread, i'll quote the question:

Quote: "Hi all. I want to create an evaluation version (trial version) of my software I'm about to release, and would like to write the amount of days remaining til expiration of my product at a selected amount of days.

here's the code:
"code"
date$=get date$()
day$=mid$(date$,4)+mid$(date$,5)
month$=mid$(date$,1)+mid$(date$,2)
year$=mid$(date$,7)+mid$(date$,8)

do
text 20,20,day$+month$+year$
loop

function DaysRemain(day$)
daysremaining = ?
endfunction daysremaining
"/code"
"


The bit you wanted was left blank with a question mark, it's like you didn't even have a go. You just asked what you wanted... this is why it takes awhile for people to respond.

Also it would help us if you cleared up your questions a bit and just talked about the root issue. It being trying to stop constantly setting variables every loop when a check variable = 1 and _picked variable > 0. We can simply chuck away everything else and deal with the core issue. So the answer:


You can actually do it a ton of other ways.

Quote: "Also what is a spinner?"


A spinner is a GUI gadget:


A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 13th Jan 2011 09:49
Quote: "A spinner is a GUI gadget"

Aah, right. Not obvious to me, sorry.

Mugen Wizardry
User Banned
Posted: 13th Jan 2011 15:57 Edited at: 13th Jan 2011 15:58
@sasuke, after reading through what you said, i FINALLY got it to work right.

Now there's one last problem I wasn't expecting.

When you click the object, it sets the spinners to whatever size the object is, HOWEVER. When you click on ANOTHER object, it ALSO sets THAT object to the same size as the 1st object after you used the spinners to scale the 1st object.

Also, _picked is sc_raycast in another part of the code itself.



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 13th Jan 2011 23:46
Someone? :/

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
nitrohaze
23
Years of Service
User Offline
Joined: 21st Apr 2003
Location:
Posted: 14th Jan 2011 14:43
Mugen,

Would you be able to post some code? its difficult to visualise.

Kindest Regards

Login to post a reply

Server time is: 2026-07-21 15:13:45
Your offset time is: 2026-07-21 15:13:45