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
Script Help Make something occur upon continue?
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#11
RE: Make something occur upon continue?

(04-23-2013, 02:33 PM)JustAnotherPlayer Wrote: Bro, the integer is 0. Refresh the page.

I think the if statement is incorrect as well;
if(alState) == 0)

There seems to be one extra bracket..

Discord: Romulator#0001
[Image: 3f6f01a904.png]
04-23-2013, 03:02 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#12
RE: Make something occur upon continue?

(04-23-2013, 03:02 PM)ROMul8r Wrote:
(04-23-2013, 02:33 PM)JustAnotherPlayer Wrote: Bro, the integer is 0. Refresh the page.

I think the if statement is incorrect as well;
if(alState) == 0)

There seems to be one extra bracket..
if(alState == 0)

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-23-2013, 03:08 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#13
RE: Make something occur upon continue?

Well, seems like it doesnt work :/
I'll sleep on it, since it is 12:15 and I have school tomorrow. Smile
I'll continue as such tomorrow.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-23-2013, 03:15 PM by Romulator.)
04-23-2013, 03:15 PM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#14
RE: Make something occur upon continue?

PHP Code: (Select All)
if(alState) == 0

I *believe* this is your problem. During a collision, the "state" is either 1 or -1, entering and exiting, respectively. When setting up the callback, you can also set alState to have a value of 0, which basically means it will call the function in either state (entering/exiting). I don't think it means that alState is passed as 0 during the collision.

Basically, your if statement is saying "only do this if the player is both entering and exiting." You see the problem with that, right?

Try changing it to this:
PHP Code: (Select All)
if(alState == 1

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
(This post was last modified: 04-23-2013, 04:06 PM by Tomato Cat.)
04-23-2013, 04:05 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#15
RE: Make something occur upon continue?

(04-23-2013, 04:05 PM)Mr Credits Wrote:
PHP Code: (Select All)
if(alState) == 0

I *believe* this is your problem. During a collision, the "state" is either 1 or -1, entering and exiting, respectively. When setting up the callback, you can also set alState to have a value of 0, which basically means it will call the function in either state (entering/exiting). I don't think it means that alState is passed as 0 during the collision.

Basically, your if statement is saying "only do this if the player is both entering and exiting." You see the problem with that, right?

Try changing it to this:
PHP Code: (Select All)
if(alState == 1

Yeah, I did note how on the wiki, 0 is defined as both entering and exiting, however, I could be misinterpreting it, as could JAP because he said to change it to zero.
I will try later tonight Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-23-2013, 10:21 PM by Romulator.)
04-23-2013, 10:20 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#16
RE: Make something occur upon continue?

Aha! Big Grin
Solved Smile
+rep to those who helped as always!

Discord: Romulator#0001
[Image: 3f6f01a904.png]
04-24-2013, 07:24 AM
Find




Users browsing this thread: 3 Guest(s)