ZodiaC
Member
Posts: 120
Threads: 8
Joined: Oct 2012
Reputation:
2
|
RE: Need help, again :P
(10-25-2012, 10:49 PM)beecake Wrote: How about having 3 different vars? And then just check if all 3 vars == 1? If they are, start the machine.
And an else { PutMoreCoal } Well that will do the trick too but why to use 3 vars when you can you use only one?
|
|
10-25-2012, 11:21 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Need help, again :P
I find it illogical. The only difficulty is to work and write more the script XD
Is there any option so you an delete a value from a var?
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-26-2012, 06:44 AM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: Need help, again :P
(10-26-2012, 06:44 AM)The chaser Wrote: I find it illogical. The only difficulty is to work and write more the script XD
Is there any option so you an delete a value from a var? AddLocalVarInt("Var", -1);
Trying is the first step to success.
|
|
10-26-2012, 07:01 AM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Need help, again :P
(10-26-2012, 07:01 AM)beecake Wrote: (10-26-2012, 06:44 AM)The chaser Wrote: I find it illogical. The only difficulty is to work and write more the script XD
Is there any option so you an delete a value from a var? AddLocalVarInt("Var", -1); Didn't know that it will be very useful for me.
Ok then, using AddEntityCollideCallbacks should do the trick. When a coal is removed, AddLocalVarInt("Var", -1);, and, when is put, AddLocalVarInt("Var", 1);
So, using some "if"'s should do the work.
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-26-2012, 09:45 AM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: Need help, again :P
Remember to think about what would happen if the player changed from this level, to another level, and back again
Trying is the first step to success.
|
|
10-26-2012, 10:59 AM |
|
Melvin
Member
Posts: 245
Threads: 38
Joined: Jun 2012
Reputation:
5
|
RE: Need help, again :P
(10-26-2012, 10:59 AM)beecake Wrote: Remember to think about what would happen if the player changed from this level, to another level, and back again
Isnt that just a matter of putting in under void OnStart()?
|
|
10-26-2012, 11:13 AM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Need help, again :P
(10-26-2012, 11:13 AM)SmokeMelvin Wrote: (10-26-2012, 10:59 AM)beecake Wrote: Remember to think about what would happen if the player changed from this level, to another level, and back again
Isnt that just a matter of putting in under void OnEnter()?
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-26-2012, 11:25 AM |
|
ZodiaC
Member
Posts: 120
Threads: 8
Joined: Oct 2012
Reputation:
2
|
RE: Need help, again :P
So in conclusion:
AddLocalVarInt("Var", -1);
is going to do var=var-1
and
SetLocalVarInt("Var", -1); is going to do var=-1
Right?
|
|
10-26-2012, 01:25 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Need help, again :P
(10-26-2012, 01:25 PM)belikov Wrote: So in conclusion:
AddLocalVarInt("Var", -1);
is going to do var=var-1
and
SetLocalVarInt("Var", -1); is going to do var=-1
Right? Let's imagine that we have the var set to 5. If we do this:
AddLocalVarInt("Var", -1);
I would have it to 4.
But, if I do:
SetLocalVarInt("Var", 1);
It's going to put the Var to 1.
SetLocal sets a position for the Var, the "AddLocalVarInt("Var", -1);" erases a value of "1" to the Var.
Did you understand?
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-26-2012, 02:00 PM |
|
ZodiaC
Member
Posts: 120
Threads: 8
Joined: Oct 2012
Reputation:
2
|
RE: Need help, again :P
(10-26-2012, 02:00 PM)The chaser Wrote: Let's imagine that we have the var set to 5. If we do this:
AddLocalVarInt("Var", -1);
I would have it to 4.
But, if I do:
SetLocalVarInt("Var", 1);
It's going to put the Var to 1.
SetLocal sets a position for the Var, the "AddLocalVarInt("Var", -1);" erases a value of "1" to the Var.
Did you understand? Yea that's what i said too
|
|
10-26-2012, 02:32 PM |
|
|