UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Check if a certain button is pressed

broken avatar :(
Created 9 years ago
by nabaro
0 Members and 1 Guest are viewing this topic.
2,460 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 3 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linkschelseafan122099nabarogamerblast11
Hey,
I was going through the script reference, _utility, and _utility_code, and I noticed that there is only a reference to checking if certain buttons are pressed, like attack, and use, and the generic
Code Snippet
Plaintext
buttonpressed();
only applies for host and appears to only apply for gamepads. Is there a way to check if any button is pressed, like forward, sprint, jump, etc.?
Last Edit: February 16, 2015, 08:49:09 pm by nabaro
Marked as best answer by nabaro 9 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Hey,
I was going through the script reference, _utility, and _utility_code, and I noticed that there is only a reference to checking if certain buttons are pressed, like attack, and use, and the generic
Code Snippet
Plaintext
buttonpressed();
only applies for host and appears to only apply for gamepads. Is there a way to check if any button is pressed, like forward, sprint, jump, etc.?

I don't know of any easy way, but you can be clever with things and use other functions like isOnGround, for jumping (only works from the ground though), and getstance for prone or crouch buttons (prone doesn't work till you are on the ground and have crouched). Forward would need to be a lot more clever, and sprint the same. Plus there is ads also that you can get, shown in _zombiemode.gsc.
Last Edit: February 16, 2015, 09:06:17 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 3 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linkschelseafan122099nabarogamerblast11
Thanks! Btw I figured out that you can check movement with

Code Snippet
Plaintext
getnormalizedmovement();
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
i sense an exo mod comming up.. launching a player.. checking for buttons  ::)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 3 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linkschelseafan122099nabarogamerblast11
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
ô_o https://www.youtube.com/watch?v=OIEmJnHbB9E&feature=youtu.be
Looks alright needs a bit more modification on how far you move but nonetheless good job. Quite interested on what you used to move the player. Would it be setVelocity or something different?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 3 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linkschelseafan122099nabarogamerblast11
Yep setvelocity and some trig functions  :)

 
Loading ...