Posted By
|
Message
|
Don Luciano Heavy combat pancake
Registered 25/10/2006
Points 380
|
17th March, 2011 at 11:41:37 -
I want an event to occur if a number doesnt go decimal after its divided by 4
For example:
20/4 = 5 yes
19/4 = 4.75 no
But how?
Code me a sausage!
|
Don Luciano Heavy combat pancake
Registered 25/10/2006
Points 380
|
17th March, 2011 at 11:47:55 -
Ah, lol i figured it out.
It's ( number mod 4 +1 = 1 ) if anyone is interested.
Edited by Don Luciano
Code me a sausage!
|
sliver
Registered 02/03/2011
Points 2
|
17th March, 2011 at 14:13:44 -
If you tried it before asking, you wouldn't pollute the board.
such a noob.
n/a
|
Zephni My other cars a Balrog
Registered 17/10/2007
Points 4019
|
17th March, 2011 at 14:21:39 -
I hope Silvers joking..
dont make me divide by zero...
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
17th March, 2011 at 15:42:43 -
Originally Posted by Don Luciano Ah, lol i figured it out.
It's ( number mod 4 +1 = 1 ) if anyone is interested.
Or just:
n mod 4 = 0
n/a
|
GamesterXIII
Registered 04/12/2008
Points 1110
|
17th March, 2011 at 17:23:17 -
Originally Posted by Zephni I hope Silvers joking..
I think hes just slightly lacking in the brain cell department. He can't distinguish a dumb question (due to laziness) from a good question, apparently.
n/a
|
sliver
Registered 02/03/2011
Points 2
|
17th March, 2011 at 18:58:47 -
just a joke. So in this board your are suceptible like this ? =o
n/a
|
Chris Burrows
Registered 14/09/2002
Points 2396
|
17th March, 2011 at 23:56:41 -
huh?
n/a
|
Silveraura God's God
Registered 08/08/2002
Points 6747
|
18th March, 2011 at 03:01:10 -
I think his 'joke' was in response to how someone responded to him when he asked a "stupid question".
Does that justify his response? No. But don't be too hard on him.
http://www.facebook.com/truediamondgame
|
OMC What a goofball
Registered 21/05/2007
Points 3516
|
18th March, 2011 at 03:05:34 -
The question he asked was completely valid. I don't think discouraging questions is a good way to keep people visiting.
Edited by OMC
|
GamesterXIII
Registered 04/12/2008
Points 1110
|
18th March, 2011 at 03:48:49 -
Well tbh I didn't think his question was a very good one, but I didn't mind it and was just going to stay quiet about it. Then I saw his post in this thread. I felt as if there was more seriousness to it than sarcasm.
n/a
|
Silveraura God's God
Registered 08/08/2002
Points 6747
|
18th March, 2011 at 03:55:02 -
I can't remember what post it was, but it had something to do with extensions and whether or not it was possible to use a bunch of them all at the same time, and I think it was Cecil who in addition to answering his question, was very... angry at him, for posting a "stupid question without trying it yourself", so while even if silver wasn't being sarcastic or joking, I think his retaliation was probably in direct response to what had happened to him by someone else.
Again, not saying it's right... not defending him, probably could've been more mature about it, but that's probably his reasoning. In which case, I say let it go with a slap on the wrist and move on, aye?
http://www.facebook.com/truediamondgame
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
18th March, 2011 at 07:48:00 -
"Mod" is short for the "Modulo" operator, which returns the Remainder of a number after division. This is commonly used in computer science and especially cryptography. Given A mod B = C, you can write it as: A = B*K + C, where K is some integer that divides out the most number of times B from A (not a decimal). So given 10 mod 5 = 0, you can write it as 10 = 5*2 + 0. Given 10 mod 4 = 2, you can write it as 10 = 4*2 + 2- here K is again 2, but there is a "Remainder" of 2, hence 10 mod 4 returns 2.
If you want to compare to the modulo, you need only write your expression as:
If A mod B = C, then (Actions)
You can write these in the expressions editor using the "compare to general values" function- you have to be aware that the object scoping is different for using a "compare to general values" expression as a direct reference from the object itself. In the former case, the action will always evaluate and always using the first (oldest) object of that class. For example code that says:
"If Alterable Value A of "Widget" mod 5 = 0"
would choose only the oldest widget. If no widgets existed, or none were currently scoped due to previous conditions, it will still evaluate- except it will default that the value A is 0. Meaning that expression would return true if no widgets existed at all, making it dangerous if you were not aware. And because it was general values, it will not alter the scope list. Meanwhile, any direct comparison from the object itself like:
"If Alterable Value A of "Widget" = 0"
Would only be true if there was a widget with value 0. Again, referring to the oldest widget scoped. It would be false if no widgets existed, and once its executed, only those widgets with value A = 0 in the current scoped are in the new scope list.
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
Don Luciano Heavy combat pancake
Registered 25/10/2006
Points 380
|
18th March, 2011 at 09:58:51 -
Sliver was just joking in reference to my defense of him when cecil attacked him on his very first post.
I said that being noobish is the way to go, its the future. So it's okay people don't get rilled up. It's just a joke.
Though i have noticed that most newcomers in this thriving community get cecilized on their first post, i did felt obliged to do something.
And pixelthief, thanks for the additional doze of confusion again.
Now that i know that Mod means Modulo I am totally going to Modulate stuff around with my Modulator.
Edited by Don Luciano
Code me a sausage!
|
Cecilectomy noPE
Registered 19/03/2005
Points 305
|
19th March, 2011 at 10:20:22 -
haha cecilized
"you better watch out n00b, you gonna get cecilized"
@silverfire - im not sure angry is the right way to put it. rather, i was annoyed and scolded him.
Edited by Cecilectomy
n/a
|
|
|