Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Jumpvel and gravity in 2.6.1

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
carter472
Member
Member
Posts: 14
Joined: June 18th, 2009, 1:34 am
Name: Adam

Jumpvel and gravity in 2.6.1

Post by carter472 »

Would it be possible to change the jump velocity and gravity in platinum art sandbox 2.6.1 by use of a trigger.

Say something like,

superjump = [ jumpvel 10000 ]

and then while in game, I press ` and type in superjump.

Or maybe I could even link it to a trigger. Like level_trigger_1 = [ jumpvel 10000 ], then I'd give say a magic stone the trigger of 1. When I touch it, my jump velocity becomes 10000

Oh and also, what are the commands for jump velocity and running speed? They change from version to version and I'm not sure if jumpvel is still used in 2.6.1

I previously used 2.3 so I'm a bit outdated here.

If its not possible in 2.6.1, which version is it possible in?

Thanks in advance for the help.
User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: Jumpvel and gravity in 2.6.1

Post by kddekadenz »

The commands in 2.6.1 are jumpvel and movespeed.
Kelgar is an advanced RPG beeing developed in Sandbox
carter472
Member
Member
Posts: 14
Joined: June 18th, 2009, 1:34 am
Name: Adam

Re: Jumpvel and gravity in 2.6.1

Post by carter472 »

Also uhh, I realize this is kinda off topic, but I'm playing around with the coding, and how exactly does guilist work?

Like for guitab, you type

guitab [ apple ]
guitext " An apple "chat

which will get you a tab with the title apple and the text "an apple" in the tab.

So how does guilist work?
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Jumpvel and gravity in 2.6.1

Post by chocolatepie33 »

For jumpvel and gravity (and don't trust me entirely on this one, but this is what I've seen before)

Code: Select all

level_trigger_1 = [ toggle editmode; jumpvel 500; toggle editmode ]
level_trigger_2 = [ toggle editmode; gravity 1000; toggle editmode ] 
What the code does is open up editmode, make the appropriate changes, then exit editmode. Those values (jumpvel/gravity) can only be modified in edit mode, as far as I know.

For the guilist... I don't know. I never really use it.

For jumpspeed, you can set up a trigger to increase or decrease the speed, like in the savetheprincess map:

Code: Select all

level_trigger_2 = [movespeed (+ $movespeed 10); jumpvel (+ $jumpvel 5); sound $munchsound]
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Jumpvel and gravity in 2.6.1

Post by arcones »

chocolatepie33 wrote:For jumpvel and gravity (and don't trust me entirely on this one, but this is what I've seen before)

Code: Select all

level_trigger_1 = [ toggle editmode; jumpvel 500; toggle editmode ]
level_trigger_2 = [ toggle editmode; gravity 1000; toggle editmode ] 
What the code does is open up editmode, make the appropriate changes, then exit editmode. Those values (jumpvel/gravity) can only be modified in edit mode, as far as I know.

For the guilist... I don't know. I never really use it.

For jumpspeed, you can set up a trigger to increase or decrease the speed, like in the savetheprincess map:

Code: Select all

level_trigger_2 = [movespeed (+ $movespeed 10); jumpvel (+ $jumpvel 5); sound $munchsound]
I'm sorry to say that's a faulty code. For one, it's edittoggle that would be used, instead of the above. Second, I've tried it properly, and it didn't work.

However, this would actually work (taken from Chaze007's experimentalchambers):

Code: Select all

level_trigger_1 = [jumpvel 250]
carter472 wrote:Also uhh, I realize this is kinda off topic, but I'm playing around with the coding, and how exactly does guilist work?

Like for guitab, you type

guitab [ apple ]
guitext " An apple "chat

which will get you a tab with the title apple and the text "an apple" in the tab.

So how does guilist work?
Guilist is specifically for organizing a gui. Looking through the data/lang/menus will help.
Image
Want a user bar like this one? PM Leo!
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Jumpvel and gravity in 2.6.1

Post by chocolatepie33 »

@arc: thanks, I knew it was something along those lines. It doesn't work, though? Huh. Worked in 2.5. I almost always got the "only in edit mode" message when trying to use the other code, however.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
carter472
Member
Member
Posts: 14
Joined: June 18th, 2009, 1:34 am
Name: Adam

Re: Jumpvel and gravity in 2.6.1

Post by carter472 »

Thanks everyone for replying so quickly. I'll try the new codes right now.

I have another question, heh, I'm really getting into coding now and I'm wondering whether more and more things are possible,

So right now let's say I use the same example I used before. I'm a cook and I earn money for each order I make. Let's say I make 200 bucks. So my money in that map goes up by 200 no problem. But if I exit the shop, ( in this case a map ) and I link to another map using the /map command, how to I make it so that the 200 bucks that I made also is added to the new map?

Edit : I just tried changing the jumpvel. It didn't work. This was what I entered into my cfg.

power = [ jumpvel 300 ]
power1 = [ jumpvel 900 ]

Then I went into the game, loaded and executed the cfg just in case, and pressed ` and typed in power. I tested the jump and typed in power1 next. There was no notable change in jump height. Did I do something wrong?
Last edited by carter472 on September 12th, 2011, 8:03 am, edited 1 time in total.
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Jumpvel and gravity in 2.6.1

Post by arcones »

Well let's say you can ONLY earn ### amount of money. In that case you just set up the other map with ### amount of money automatically. Otherwise, it's rather hard.
Image
Want a user bar like this one? PM Leo!
carter472
Member
Member
Posts: 14
Joined: June 18th, 2009, 1:34 am
Name: Adam

Re: Jumpvel and gravity in 2.6.1

Post by carter472 »

I thought of that, but that brings up another problem. I could copy the exact same map ( of the outside world ) and have the restaurant map load the copied map file of the outside world that was already set up with 200 bucks. But then would't all the quests or other sidequests that were previously done be reset and the player would have to redo them?

Cause I wouldn't know which quest the player would go for first. They might decide to gather apples for the pie maker first, then only become a cook in the restaurant. Is there a way to remedy this?

Oh and the guilist? I looked at data/menus but I don't really understand much. I still have a lot to learn I suppose heh. Could someone just give me a brieft simple explanation. I just wanna know how it works is all. I can try to figure out everything out myself.

And thanks once again for helping out so quickly. Its a big help
User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: Jumpvel and gravity in 2.6.1

Post by kddekadenz »

carter472 wrote:Would it be possible to change the jump velocity and gravity in platinum art sandbox 2.6.1 by use of a trigger.

Say something like,

superjump = [ jumpvel 10000 ]

and then while in game, I press ` and type in superjump.

Or maybe I could even link it to a trigger. Like level_trigger_1 = [ jumpvel 10000 ], then I'd give say a magic stone the trigger of 1. When I touch it, my jump velocity becomes 10000
This will increase speed to 900 and jumping to 850 for 20 seconds when touched:

Code: Select all

level_trigger_1 = [
movespeed 900
jumpvel 850
echo "You feel suddenly like a superhero."
sleep 20000 [ 
movespeed 100
jumpvel 100 
echo "It's over."
]
]
I've tested it with 2.6.1 (FPS-mode), and it works pretty good.
Kelgar is an advanced RPG beeing developed in Sandbox
Locked