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 / Can the player appear with"appearnogravity.fpi" ?

Author
Message
rafale42
13
Years of Service
User Offline
Joined: 2nd Jan 2011
Location:
Posted: 3rd Mar 2011 22:07
I want to build a room with no gravity.I use the script "appearnogravity.fpi" for the items.But can I use it for the player?
thanks
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Mar 2011 12:12
I just tried it in a test map and you can. They will hold that height even in death. twitching at that height. They do everything else scripted for.

What about going into the FPE file and placing a value in the <offy> spot like 45 would be 45 units off the ground. Might be best for collision and interacting.

Other way would be to animate what you want at that height above the 0,0,0 plane in a model program. but you could only shoot it at normal height.

Nothing but coffee in my veins 'Insomnia is Coming'
rafale42
13
Years of Service
User Offline
Joined: 2nd Jan 2011
Location:
Posted: 4th Mar 2011 13:19
How can I open the player start.fpe?
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Mar 2011 17:43 Edited at: 5th Mar 2011 18:41
EDIT: Misread Sorry

Nothing but coffee in my veins 'Insomnia is Coming'
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 4th Mar 2011 21:15
@Pirate Myke:

The Op is talking about the Player Character

In case you find my grammar and spelling weird ---> native German speaker ^^
rafale42
13
Years of Service
User Offline
Joined: 2nd Jan 2011
Location:
Posted: 4th Mar 2011 22:27
Yes,because I found how make the items appear with no gravity
JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 5th Mar 2011 16:30
At the moment you cannot make the player have no gravity.

However, you could make it seem like there is less gravity be changing the 'hurtfall' value of the player.

C++ is labourless... if your name starts with 'L' and ends with 'ee'.
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 5th Mar 2011 18:35 Edited at: 5th Mar 2011 18:44
My bad,

Cosmics prophets Jet pack tried playing with the camera to lift the player. But you had to hold a key on the keyboard and you ran out of fuel real fast. that actually did work. Maybe you can modify that.

Might try making a transparent floor for the effect.

Nothing but coffee in my veins 'Insomnia is Coming'
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 5th Mar 2011 18:47
Quote: "At the moment you cannot make the player have no gravity."

Are you sure about that?

Quote: "Cosmics prophets Jet pack tried playing with the camera to lift the player. But you had to hold a key on the keyboard and you ran out of fuel real fast."

If you associate the player to an object that has no gravity then the player should have no gravity. (I have not tested it but it should work)
I'm in the middle of a critical project right now, but I'll play with this a bit later tonight and see what I can come up with.

Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 9th Mar 2011 06:49
@CE - thats right. you wrote that script. Great work. I wish they would allow us more camera control in vanilla version.

Nothing but coffee in my veins 'Insomnia is Coming'
Scurvy Lobster
18
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 9th Mar 2011 08:28
You can place a water zone that creates water on the entire level. That should work a bit like no gravity. You can edit the water script to remove "fog" effect of water.

Problem is that some objects will behave strange in a water physics environment.

rafale42
13
Years of Service
User Offline
Joined: 2nd Jan 2011
Location:
Posted: 12th Mar 2011 11:25
Thanks,but in my project,there's water ,and I want to build a room with no gravity,not a map.
Design Runner
14
Years of Service
User Offline
Joined: 16th Oct 2010
Location: In my own little world.
Posted: 13th Mar 2011 20:33
You could place a script in a trigger zone in the room that makes the water level above that room, then another trigger zone that lowers the water level at the end of the room.

The quick brown fox jumps over the lazy dog
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 13th Mar 2011 20:45 Edited at: 13th Mar 2011 20:51
Sorry I haven't got a chance to work on this yet, but I will make time tonight to try the antigravitational room idea.
If I can get it to work we will still need a way to go up and down, so I'm thinking of making the jump and crouch work for that.
I'll definitely post something tomorrow with the results.


EDIT
It sounds like it may be like my camera lift script in my puppet script thread.

Here is the cameralift script. (this will work in a test build)
It can be a little buggy, like droping you to you death if you don't have a floor under you, but you'll get the hang of it.

Here is how to set it up....

1) Place an entity in your map that is out of camera view or has an transparent texture. (I used the Sci-Fi > Items > Battery)

2) Set its ALWAYS ACTIVE? to YES

3) Set the script below as the battery's AI MAIN





It may be a little sloppy, but it works.

Here are the controls...

'Z' Toggles the camera lift on or off

Be carefull not to drop yourself too far when toggling off, or you might take damage.
Another thing to remember is that toggling on returns you to the last height the lift was set at.

'V' Moves the camera up

'B' Moves the camera back down

Anyway, you can play with this until I get a chance to make a script better suited to your request.

Have fun!

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 15th Mar 2011 16:06 Edited at: 15th Mar 2011 16:11
Okay
I am double posting in this thread just so it will bump and people will know I attached a new file.

I finally got a chance to play around with this thing this morning, and I had some success.
I am attaching the 3 scripts necessary for the effect, and I am also attaching a simple level which should demonstrate how to set it up.
Here is a brief explination of what is going on and the directions, just in case there is any confusion...

The three scripts are as follows:
appearantigravity_ce ... This is the appear script for the entity that the player will be associated with in order to achieve an antigravity effect.
I modified the stock script so the setalphafade=0 instead of 100 so the entity will be invisible.
I also added a coloff so the entity will have no collisions and the player won't get stuck on it should they run into it.

plrantigravity_c...This is the script for the Main AI of the Trigger Zone that will define the area to have the anitgravity effect for the player.
In this example it is a room, and you can layout a trigger zone for large areas by holding the left shift key while you are placing the zone.

plrantigravity_e...This is the script for the MAIN AI of the entity, which in our case I used a sci-fi battery.

The setup for this effect is fairly easy...
1) Place your trigger zone for the desired area and assign the plrantigravity_c for its AI MAIN.

2) Place an invulnerable (health=0) and immobile (isimmoble=YES) entity in your map and assign the appearantigravity_ce for its appear script.
Also assign the plrantigravity_e for its AI MAIN.

3) Turn off the Physics for the entity. (Physics On? = NO)

4) Name the battery age1 (this is short for AntiGravity Entity 1)
If you want to use another name, then you will have to edit the plrantigravity_c script for the trigger zone to reflect that name change for the target.

That is it for the setup.

I ran into problems with the jump key making the player get stuck, and I finally got it working half right.
If you are moving while you hit the space bar for a jump then you will float across at that speed and direction until you hit a wall or something else to stop you.
Then you are stuck, but you can get unstuck by hitting the jump (space bar) again.
If you want to defy the anitgravity and fall with gravitational forces then simply hold down the space bar.

This is not perfect, but maybe it comes close to what you want and can do until we find a better solution.
Make sure you keep the folder structure right when installing the files.
The scripts belong in scripbank\conjured folder, so create a conjured folder in your scriptbank if you don't already have one.

Have fun and let me know what you think.

Attachments

Login to view attachments
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 15th Mar 2011 19:34
You rule CE, I will download and test this also.

Nothing but coffee in my veins 'Insomnia is Coming'

Login to post a reply

Server time is: 2024-11-24 11:16:56
Your offset time is: 2024-11-24 11:16:56