2 registered members (AndrewAMD, Ayumi),
1,405
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
help with adding keys...
#312693
02/25/10 23:47
02/25/10 23:47
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
ok, I have a flashlight script that uses two button to trigger it. the f key on a pc keyboard and the x-box 360 controller button joy_5. it works fine.
while (energy > 0 && key_f + joy_5== 1)
I want to do the same for other codes i have with no success. i want to use the keyboard and the the 360 controller to trigger these other things as well. when i try to add the other keys, I get errors. what can i do? i want to have the option to use either the mouse and keyboard or the 360 controller buttons.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: help with adding keys...
[Re: Superku]
#312718
02/26/10 03:03
02/26/10 03:03
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
thanks for the response superku, seems like a lot of work. cant i simply just add something like my example to the existing code? i just dont want to ruin the code i have by adding too much. the code i am trying to change works perfectly when i switch and use either mouse/keyboard combo or 480, but gives me errors when i add both to the script. its either on_k or joy_10, as an example. why doesnt this work?
on_mouse_right && joy_10=gravitation_gun;
Last edited by Blink; 02/26/10 03:09.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: help with adding keys...
[Re: Blink]
#312794
02/26/10 14:21
02/26/10 14:21
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
This "on_mouse_right && joy_10=gravitation_gun;" is wrong syntax. Try on_mouse_right =gravitation_gun; on_joy_10=gravitation_gun;
Last edited by Superku; 02/26/10 14:22.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: help with adding keys...
[Re: Superku]
#312871
02/26/10 17:13
02/26/10 17:13
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
i actually tried that and i got an error on joy_10. thats why i need help.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: help with adding keys...
[Re: Blink]
#312876
02/26/10 17:17
02/26/10 17:17
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
truthfully, i dont mind using the graviton gun as is, is my other weapons. i want them to be able t be used with either te keyboard or360 buttons.
update: ok, I was able to add a key to one weapon script, let's see if I can figure the rest out. for some reason it didnt work before. maybe i did something wrong.
Last edited by Blink; 02/26/10 17:35.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: help with adding keys...
[Re: Blink]
#312881
02/26/10 17:47
02/26/10 17:47
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
ok, this is at the end of my script on one of the weapons. i tried adding a key to it and i got a "too many variables" error.
on_joy3 = create_boomerang;
I changed it to : on_joy3 + on_b = create_boomerang; and tried: on_joy3 + on_key_b = create_boomerang; got errors.
Last edited by Blink; 02/26/10 17:51.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: help with adding keys...
[Re: Blink]
#312896
02/26/10 18:55
02/26/10 18:55
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
as Superku say: don`t use && or + in on_x.
Use only one key or joy for one on_xxx
on_joy3 = create_boomerang; on_b = create_boomerang;
Edit: joy_10 is wrong, use joy10 (USE THE MANUAL !!!)
Last edited by Widi; 02/26/10 18:57.
|
|
|
Re: help with adding keys...
[Re: Widi]
#312911
02/26/10 21:59
02/26/10 21:59
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
I know Widi, I am not a newb, I just forgot how to do some things, yelling USE THE MANUAL!!! doesnt really help..
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
|