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.

FPSC Classic Scripts / 2 condition set up exactly the same, only the top one works

Author
Message
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 10th Jun 2011 17:33
So I have thes to lines of code:




Only the one on top works. So if I switched it to this:




Only the top one works again! It makes no sense what so ever.
Anyone have a debugging solution?


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 10th Jun 2011 18:22 Edited at: 10th Jun 2011 18:23
Is there a mousestate=2? (I wasn't even aware that we had the mousestate=1 until now)

According to the new sysntax list, mousestate has only 2 values, which are 0 and 1.

mousestate=1 is true if the left mouse button is clicked
mousestate=0 is true if the left mouse button is not clicked

It would be nice if we had a mousestate=2 for the right click.
Then mousestate=0 could be true if neither of the buttons is clicked.

Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 11th Jun 2011 05:07
My "mousestate=2" works. At first, it had no effect on my script, but when I put a "state=X" in front of it, it worked. Here's the script:



I believe I should put a smart comment here, but I wouldn't have time to think about it.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Jun 2011 15:05 Edited at: 11th Jun 2011 15:07
Quote: "My "mousestate=2" works."

AWESOME!
I guess this needs to be added in the new syntax list, because it only exlains =0 and =1.

I am really loving all of these new FPI conditions/actions!
Now, I just need to figure out what others are in there and not mentioned.

Thanks to Plystire, Hockeykid, S4real, and all of the other modders whose ideas and code have been added to the stock engine.


2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 11th Jun 2011 16:10
Still why does my script not work? There is no error within it....


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Jun 2011 05:00 Edited at: 12th Jun 2011 05:04
Why would the second one work once you have moved to state=77 and used a runfpi=xxx?

Once you use the runfpi=xxx then that script is running for the entity, not this one, so the second one won't work because it isn't checking anymore.

Try using the second key/mouseclick first and it should work, but then the first one won't work, because again, you have left the script with the runfpi=xxx

Quote: "There is no error within it...."

No syntax error maybe, but there are other types of errors, right?

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 12th Jun 2011 05:24
No, you don't see what I'm talking about. I didn't explain it well enough, my bad.
Ok so, in the code that I showed, when I press a button it ends the script(by going to state 77 that doesn't exist) and then runs a script.
But the weirdest thing is, only the line of code on top will work. So if the mousetate was on the bottom and I right-clicked, it wouldn't work, alternatively, if it was on top of the other line of code it would. This must be strange to someone.

It might just be one of those thing that doesn't work for me like how the anywithin command doesn't work for me...


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators

Login to post a reply

Server time is: 2024-11-24 09:07:42
Your offset time is: 2024-11-24 09:07:42