Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help, again :P
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#11
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?

[Image: 2H1Mc.jpg]
10-25-2012, 11:21 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#12
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)
[Image: k6vbdhu]

Aculy iz dolan.
10-26-2012, 06:44 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#13
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
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#14
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 Big Grin 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)
[Image: k6vbdhu]

Aculy iz dolan.
10-26-2012, 09:45 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#15
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
Find
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#16
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()?

[Image: 25F7U37.png]
10-26-2012, 11:13 AM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#17
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)
[Image: k6vbdhu]

Aculy iz dolan.
10-26-2012, 11:25 AM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#18
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?

[Image: 2H1Mc.jpg]
10-26-2012, 01:25 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#19
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? Smile

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-26-2012, 02:00 PM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#20
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? Smile
Yea that's what i said too Smile

[Image: 2H1Mc.jpg]
10-26-2012, 02:32 PM
Find




Users browsing this thread: 1 Guest(s)