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.

Binding key to equipping spell

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.
Locked
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Binding key to equipping spell

Post by owenisred »

Posted this at the end of an old post, but it died out, so I though I would reiterate here

Is there a way to write a script to BIND a key to equipping a spell?

Thanks,
Owen.
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
User avatar
Bigboss
Member
Member
Posts: 282
Joined: July 23rd, 2010, 1:35 pm
Name: Naked Snake
Contact:

Re: Binding key to equipping spell

Post by Bigboss »

I heard of that somewhere...
Probably but I am terrible at scripts *darn*
Zombie map (Version 2) Image
Image
Want a user bar like this one? PM Leo
Image
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Re: Binding key to equipping spell

Post by owenisred »

anyone? please?
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
User avatar
Runescapedj
Member
Member
Posts: 1706
Joined: January 9th, 2010, 9:06 am
Name: Michiel
IRC Username: Sandboxdj
Location: Deventer, the Netherlands

Re: Binding key to equipping spell

Post by Runescapedj »

I'm sorry, I think I'm even worse at scripts than Bigboss (I only know a toggle edit and a savemap code)
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Binding key to equipping spell

Post by PizzaLover101 »

go on the wiki and search bind keys. You might find it there.
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Re: Binding key to equipping spell

Post by owenisred »

Thanks! I had a look, I know how to bind a key to an action, but nothing tells me the command for equipping a spell. I have looked through the .cfg files, and I keep seeing things like the Tab key is bound to showplayergui or in master chef ogro's game its something similar, but with I.

I always thought that it needs to define what playergui was in the same .cfg file, for exaple, here is the beginning of the "shop script"
"level_trigger_2" = "showgui Shopkeeper"
newgui Shopkeeper [
guitext "What're ya buyin, stranger?" chat
guibar
guilist [
guibutton "Pie: 10 moneys" [
if ( > $money 9 ) [
money = ( - $money 10 )
pie = ( + $pie 1 )
]
]
You see, it says showgui Shopkeeper and newgui Shopkeeper defines it.

This is why im confused. If I could find the playergui script, I could study it and find out the command to equip a spell. But unfortunately, I cant find that script in any .cfg file The closest I could get was some rpggui.cpp file that I couldnt understand.

EDIT:
if (strcmp (getgame) "rpg") [
bind F1 edittoggle
editbind F1 edittoggle
bind MOUSE1 [ primaryattack ]
bind MOUSE2 [ secondaryattack ]
bind e worlduse
bind TAB [showplayergui (! $showplayergui)]
]
This is what I mean - where is playergui defined
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
Locked