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 / Need help with a theoretical "freeze/no gravity" script.

Author
Message
Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 25th May 2009 05:17
Well, it's me, back again needing help on Physix. Plystire and I just had a chat and he agreed to design a custom mod for me. After bumping ideas (and dollar signs), the mod was made (@Plystire I'll have you the money when the banks open to get mine) and since I don't officially have it yet, I took the trial for Ply's Mod for a spin (They are kinda similar in fundamentals). Here's what I need you guys for:

I have this script that I'm making that when you push a switch the gravity of the affected entities turns off (easy). Right now, I have it when you push the switch again, it turns back on (thanks again Ply!), but what I need it to do is: when it's pushed a second time, the box freezes in space and doesn't move. Then, when it's pressed a THIRD time, the cube then starts, not only moving, but regains gravity. Due to the nature of this project, the only NEW FPI tag is "gravity", which turns an entity's gravity back on when it has been turned off. This is what I have so far:



Needless to say, it DOESN'T work. Anyone have any ideas?

My cubes keep getting caught in the vents!!!
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 25th May 2009 05:52
#1: What version of Ply's Mod? V109?
If you're using the V108 version of Ply's Mod, freeze=x isn't a command so
won't run.

Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 25th May 2009 05:55
For my tests,I AM using v108... I'm really not sure what version source he's using for MY mod either... If freeze won't run, are there any alternatives?

My cubes keep getting caught in the vents!!!
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 25th May 2009 05:58
Not that I'm aware of. Try V109, your script should work then.

Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 25th May 2009 06:04
Um... As I stated earlier, I'm NOT actually using Ply's Mod... But thanks for the advice. (Maybe I need to talk to him)

My cubes keep getting caught in the vents!!!
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 25th May 2009 06:12
Well...make sure he either uses V115 source or implements in your private mod then.*shrugs* It was just a suggestion.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th May 2009 07:23
I believe V108 has the AirMod version of the "freeze" command in it. I never looked at it very closely, so it may act differently than the official "freeze" command. V109 of Ply's Mod uses the official "freeze" command and I took out the AirMod one since it was just a stand-in for the official.

I made your Mod in V115, so no worries there.


The one and only,


Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 25th May 2009 07:56
Thanks man... Appreciate it

Anyway, now that we KNOW what version it is, how should I go about making the script? Was I right?

My cubes keep getting caught in the vents!!!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th May 2009 01:49
As long as your switch activates the entity properly, then it should work.


The one and only,


Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 28th May 2009 02:44
Would the script I have do it? I usually don't mess around with switches.

My cubes keep getting caught in the vents!!!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th May 2009 23:22
Your script requires its activation value to be changed, so SOMETHING would need to activate it.

Also, the "freeze" command does not act like the "plrfreeze" command. It does not accept a value, it will only prevent the entity from moving at that instant in time. To make it freeze the entity for a time, then it will need to be constantly called. It looks like that is taken care of in your script, though, if the activation value is 2.


The one and only,


Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 29th May 2009 00:18
OH...THAT'S WHAT YOU GUYS MEAN...

Okay then, wow, that's good... I've already re-scripted a switch to do such a thing. My question mainly was: "Is "activate=2" a real variable?" I had never done it before. Guess I should have made myself more clear Good thing you knew kinda what I meant

My cubes keep getting caught in the vents!!!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th May 2009 21:29
"activate=X" will change the entity's activation value (the entity that the script is attached to)

"activatetarget=X" will change the entity's target's activation value

"activateifused=X" will change the entity's IfUsed activation value (The entity specified in the IfUsed field)


Depending on what you're trying to do will determine which of these activation methods will be better for you.
You may use ANY value to activate an entity.


The one and only,


Login to post a reply

Server time is: 2024-11-25 02:08:41
Your offset time is: 2024-11-25 02:08:41