Scripts / Player in vehicle

Author
Message
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th Mar 2016 16:19
Is there a way to stop a player leaving a vehicle once entered either stop them leaving for the whole level or hurt them if they do? or even with a safe area?
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Mar 2016 17:52 Edited at: 16th Mar 2016 17:53
i have a script that adjusts player oxygen which would fit.

set oxygen_level.lua to an always active object and then you can set safe zones (in door areas marked with a zone) with go_inside.lua and finally for your needs you would need to add something like this to your script that controls the ship

lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th Mar 2016 19:16
Sweet thanx smallg, I have the oxy script, we used it in the basics of the cold, heat scripts, go inside is already set on the map to hide the terrain, so I think I can play around with those two, @ship part oh yeah see that now ty, heres the new station

Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th Mar 2016 20:17 Edited at: 16th Mar 2016 20:19
hmm didn't really work that one as I have go indoors hiding the terrain :/ the script I'm using is called flyship is there any way I could just kill the player if it goes out of range of the script? or ship called ship1? e.g leave the ship and die lol
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Mar 2016 21:28
go_inside is not go_indoors, different scripts
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th Mar 2016 21:39 Edited at: 16th Mar 2016 23:11
lol do'h ok thx m8 :0 still keeps killing me in the ship :/ or doesn't where should I add that m8 main?, init seems to do different things e.g work and do nothing when you leave the ship or just kill you in the ship lol Edit sry smallg looks like it was the editor works now ty just adjusting speed of death e.g = 0 lol "don't get out your ship"

Can you take the timer off that script so it = instant death? hmm I suppose I could freeze the player pmsl
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Mar 2016 23:41
you can adjust the settings at the top, delay (line 5) makes the oxygen drain faster/slow and damage_delay (line 7) makes the damage apply faster/slower
and settings for oxygen amounts and damage are there too
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 17th Mar 2016 16:41 Edited at: 17th Mar 2016 16:49
Got it sorted smallg thanks m8 works well now another little thing I have a aircraft_flying script working which works well (think this was one of Gtox's posts) only problem is all the craft fly to one end of the map and then huddle up whereas I want them to turn around and fly back or even take a random direction?
here's the script that makes them fly across to one side

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 17th Mar 2016 17:37
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 17th Mar 2016 17:47 Edited at: 17th Mar 2016 18:10
ooo ty giving it a go Edit lol that's funny some spin round in circles in the distance then suddenly taz off now that's random instead of set player distance is there a way to tell the entity that its hit something e.g the end of the map and turn and go another way? just looking at the command list ;/ ive adjusted the camera distance which helps the just spawn in and fly past now
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 17th Mar 2016 20:16 Edited at: 17th Mar 2016 20:17
Question on the go_indoors/outdoors script smallg if you see this. When I enter a space station on the map with go_inside set up I can get out the ship fine but as soon as I leave the station (even in the ship) I die lol :/ any idea why?
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 17th Mar 2016 21:58 Edited at: 17th Mar 2016 21:59
did you add the code for checking distance to the ship i put up earlier?

for the flybys - yh i thought that might happen but was being lazy

lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 17th Mar 2016 23:02
Ok was a hard night tonight things going skyward lol I now have 3 landable planets, 4 dockable space stations, and a dockable warp ring = next area of space, small's random space craft = very cool just need to work on the doors and a few other things e.g ststion turret like 50m in the air till you get close so ive left them off till I find a way to keep them on the station, also need the indoors outdoors script to work on every station but its getting there heres a preview ove the station docking


Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 18th Mar 2016 21:15
a new ship on the block battleship Lincoln, would prefer to directly trade with the ship instead of an entity but it works

Login to post a reply

Server time is: 2024-05-03 15:48:59
Your offset time is: 2024-05-03 15:48:59