Scripts / [COMMUNITY] Design a ladder set

Author
Message
Devcore35
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 12th Aug 2015 11:18 Edited at: 12th Aug 2015 11:19
Hello everyone !

I propose to design a script to automatically set up the ladder by pressing "E" for example.

Principle of LUA script:


Name: ladder.lua
Description: The player stands in front of the ladder. A message "Press E to mount" appears. Once the "E" is pressed the player alone rises with the size of the scale.

So I think we should change the gravity (or something like that) that would allow the player to get on the Y axis for a time programmed in advance.

Example: If the scale must be a certain size then calculating the time to get on the Y axis (imagine that four seconds is necessary). After 4 seconds gravity returns to normal. Thus the player will no longer move has to reach the top of the ladder.

Of course given the time will add 0.5 seconds to prevent the player from falling back.

In human language script would give her this:



The return of the variable can be traced back again across (and so on).

If someone expert enough in LUA language can help us design a scale usable & then it is welcome

I prepare the 3D scale of 5 different ways (because time cancellation of gravity depends on the size of the scale, so it takes more than one).
PM
Avram
GameGuru TGC Backer
18
Years of Service
User Offline
Joined: 3rd Sep 2006
Location: Serbia
Posted: 12th Aug 2015 14:29
You already can climb ladders (if they are placed with a certain degree*), so it's just a matter of spawning them in front of you.

* - in most cases you need to jump repeatedly in order to "climb" them
SoUlFaThEr
9
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 12th Aug 2015 15:01
I noticed that the tower in Dagoreds bunker entity set has that effect that you need to jump repeatedly.
Thats less than a desired effect however.

only way i could see this working is with changeing the climb angle with a very small zone at the base and at the top of said ladder that adjusts the climb angle.....which we dont have yet afaik........

only problem is your players using it to cheat, so youd need another zone outside of the one changing it to allow the ladder...that resets the climb angle so that they can just get the climb angle.........then walk away with it climbing up your terrain with ease

I think it will pay to wait for the lua update because if i am not mistaken, this properties attribute would be added as a lua command.

Everything else done before thius is a less than optimal solution and possibly also a waste of time. Gravity isnt the pretty way to solve this i think.

Anyone else?
The only stupid questions are those that were never asked.
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 14th Aug 2015 14:51 Edited at: 14th Aug 2015 14:51
You could set a entity with no collision in front of the ladder and let them fly the ladder up for 4,5 sec. With gravity you have no chance to do this. After we have no controll over the player we must contoll entities and transportifused the player to the entity

If you need more help contact me
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 14th Aug 2015 17:59
One decal in the ladder start and another one on the end, and as Corno_1 said above transport player between them.
Freeze/unfreeze player, if you want to prevent moving a while.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Devcore35
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 14th Aug 2015 19:23
3com : excellent idea

I will try to create this kind of system and I'll post the LUA script to test with a tutorial and tell me what you think
See for change ^^
AlgoStep Company - Software development and 3D video games since 2006
-----------
If it's in the game, it's in the game !
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 14th Aug 2015 19:33
Glad you like, nice weekend so.

Remember you should be able to moving in both directions (up & down) .

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-12-22 05:27:20
Your offset time is: 2024-12-22 05:27:20