Scripts / How to do a simple rail-shooter seqence?

Author
Message
SmugglerSynku
9
Years of Service
User Offline
Joined: 8th May 2015
Location:
Posted: 2nd Jul 2016 19:47
Hello, its my second time here
Is there a way to do something like:
1. Im jupming into a platform/car/boat/whatever
2. My platform start driving when im in it, it moves by the waypoints
3. when it reach the last waypoint it stops and i can get out

Its important for me to have ability to look around and shoot when im driving, i tried to use lift script from twitch broadcast but when im in the lift i cant look up and down. Hope someone can help me
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Jul 2016 13:35
Here is a starting point for you, you will need to figure out how to keep the player on the platform though.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 3rd Jul 2016 16:07
or just use the default platform script in the scriptbank?

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jul 2016 17:30
also this combined with the platform script would work
https://forum.game-guru.com/outbound?url=https%3A%2F%2Fforum.game-guru.com%2Fthread%2F207801%3Fpage%3D15%23msg2551879
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
SmugglerSynku
9
Years of Service
User Offline
Joined: 8th May 2015
Location:
Posted: 3rd Jul 2016 18:57
I tried standard floating platform script, it does almost what i want, but my platform is very slow, and it wont rotate; what i need to do to change it?
PM
Nomad Soul
GameGuru Tool Maker
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 3rd Jul 2016 19:19
It would be awesome to do Time Crisis in GameGuru. You could incorporate couch to dodge enemy gunfire and such.

You need to be able to control the player camera for scripted sequences in between the action though.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Jul 2016 00:01
The 'standard floating platform script' doesn't work at all for me which is why I wrote my own version. What is missing in GG for things like this is proper player physics, i.e. entities can have friction set but how do I set the player friction?

The simple fact that I have to turn off collisions before setting an entities position then turn them back on tells me something isn't quite right, I think I recall Lee saying that he had things the wrong way around and that he has fixed it for the next version (i.e. Lua first then Physics) so maybe things will work right in the next Beta.

Lua commands should override all other considerations in the engine otherwise they are indeterministic, hopefully one day all aspects of the engines behaviour will be scriptable and then requests like this will be simple to answer.

Maybe what we need is to be able to specify within the script where it should be executed in the game loop, i.e. scripts that effect the rendering of 3d objects need to be executed prior to the rendering part of the pipeline whereas scripts effecting physics need to be executed prior to the physics engine part of the pipeline. We could even, gasp, have Lua scripts controlling the lighting portion of the pipeline and even the post processing portion, for example which shaders to apply!

In a similar vein call-backs from the physics part could be available to Lua scripts tagged to run after the physics processing has completed so that custom collision detection could be catered for. The bullet engine provides call-backs to give a list of entities that will interact within the next cycle, if these were available to Lua scripts as a list .....
Been there, done that, got all the T-Shirts!
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 4th Jul 2016 07:56
Quote: "The 'standard floating platform script' doesn't work at all for me which is why I wrote my own version. "


Seems to work perfectly for me, it might be something you're doing wrong in the set up.

Let's see:

1. Place a marker, and using shift+click and drag, make your route.
2. Place an entity to use as a platform (make sure it's not too high as you will be too far from the waypoint marker for it to detect).
3. Set the entity to static = no
4. Set the entity to isimobile = yes

It should work.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Mariokiki
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 4th Jul 2016 15:23
You can also use the latest modified version of Smallg script (floating_platform2.lua) which works fine !

Take a look at my video : https://www.youtube.com/watch?v=pJHd1rNdByQ

Everything is in this thread : https://forum.game-guru.com/thread/215239

If it helps ...




PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Jul 2016 17:13
Mine works fine, just need to figure out how to finagle the freeze stuff to allow the player to move around on the platform whilst still allowing the platform to carry the player along when he is stationary, I think I have it sorted out and I'll test my idea when my daughter has finished mucking about with Blender.

What I am aiming for is to be able to jump across a series of moving platforms as someone I am working with has requested this sort of thing.
Been there, done that, got all the T-Shirts!
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 4th Jul 2016 17:34 Edited at: 4th Jul 2016 17:38
Quote: " just need to figure out how to finagle the freeze stuff to allow the player to move around on the platform whilst still allowing the platform to carry the player along when he is stationary"




https://forum.game-guru.com/thread/215239#msg2547512

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Jul 2016 19:27
Yep, that's what isn't working. Not sure why but I am still running with the last Beta build, still suspect It has something to do with what Lee mentioned about the Lua scripts being run before the Physics are applied, he has switched this around in the next build which I have a bunch of scripts waiting for.

Looking at your '2' script I notice you are applying a correction factor based on the speed, maybe this is taking account of the physics engine interference and correcting it, I am explicitly taking the difference in X.Y.Z between platform and player position then applying that same difference after the platform has moved which in theory should work but in practice isn't working as expected.

What does the 'issimobile' setting actually do? Doesn't seem to make much difference in my case (and it does seem counterintuitive to set it to 'yes' for a moving entity!
Been there, done that, got all the T-Shirts!
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 4th Jul 2016 20:29 Edited at: 4th Jul 2016 20:30
Quote: "What does the 'issimobile' setting actually do? Doesn't seem to make much difference in my case (and it does seem counterintuitive to set it to 'yes' for a moving entity! "


It stops it falling through the floor and killing you.

As to you being on the previous beta build, that shouldn't be the reason it didn't work, this scripts been working fine for at least three builds as far as I know.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Mariokiki
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 4th Jul 2016 23:16
Sorry AmenMoses,

According to your request, this script seemed to be the best.

I don't have sufficient knowledge to help you, and I'm sorry if this script doesn't give you full satisfaction for what you want to perform...

Regarding the game than I'm preparing, I use this script with a 3rd person character (as you can see in the video) like "Mario 3D" game and it works correctly.

I hope you will find the solution to your problem !



PM
SmugglerSynku
9
Years of Service
User Offline
Joined: 8th May 2015
Location:
Posted: 5th Jul 2016 12:44
Big thanks for all answers, i will try your scripts
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Jul 2016 22:50
Damn this is annoying, usually when I have a problem getting my scripts to work I can figure out what is causing it and a quick email to Lee results in an engine fix to solve the problem but this one has me baffled.

Basically I calculate the offset between the current platform position and the player position then move the platform to its new position and then set the freeze position to new position + offset and call TransportToFreezePositionOnly(). In theory this should work as it is basically the same thing being done in smallg's '2' script. But it doesn't work, instead the player slides off the platform.

Even if the current bug resulting in the Physics engine overriding the Lua commands is to blame I can't understand why smallg's script doesn't suffer the same problem , unless somehow the script has managed to disable the physics whilst still allowing for collision detection which would be surprising as I've not managed to get that to work.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-12-22 18:49:51
Your offset time is: 2024-12-22 18:49:51