Hi. ^^
I have a script that use screen touch to move the player, but i would like a more elegant solution... With great surprise, i could make a script that move the player in four direction (it is a 2D top down game) while pressing one of four GUI Texture. The problem is that these textures are in the scene, and they are used by the script. Activate and deactivate the script through ORK is not a problem (in custom controls/blocks) but i would like to know if there is a way to have 4 GUI elements made in ORK and link those to my script.
Or if there is another way with just ORK system. :)
Thanks in advance. :)
If your player control uses ORK input keys, you can use a Control HUD to do this. Otherwise it'd probably be more complicated, e.g. using global events (called by input keys that are set via the control HUD) to call your movement script.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
However, may i link HUD to my script function? Could it work if the HUD activate the ORK input and the input activate script funcion, like it would be a mouse or touch? My GUI texture can activate the script quite well, but using external textures is quite annoying as i cannot control them with ORK.
Tips? ^^
My old entry for Indie Game Making Contest 2015
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Is there a way by script, a code line, in which i could check if a specific HUD is checked?
something like:
if (ORKHUDUpButton.pressed) do various stuffs...
Or another way i was thinking about, is it possible to hide some GUI textures like HUD, if you are in battle, pausing, menu screen etc...?
EDIT: Does limit time in Rigidbody - Add Force works properly? My player seems to keep moving even after the 1 second of limit time i set, even if i use wait and i set the next step to Stop Rigidbody.
Thanks for the help. :)
My old entry for Indie Game Making Contest 2015
if(ORK.InputKeys.Get(int index).GetButton())
index is the ID/index of the input key.
HUDs have display conditions, e.g. game states like in battle, in control, etc.
Should be working, but keep in mind that add force adds a force to a rigidbody that'll continue to be there until stopped.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Never scripted anything using ORK code so i am totally unexperienced. :D
I use Stop rigidbody after 1 second but it doesn't seem to stop... ANy tip?^^
My old entry for Indie Game Making Contest 2015
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Player, rigidbody, colliders are still the same, i just made a global event in which with a key pressed add a force on x direction for 0.5 sec and then i use the Stop Rigidbody event. ^^
If you still have my project you can test in in 5 minutes, if not i will resend you a project as soon as i can. :)
My old entry for Indie Game Making Contest 2015
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
About custom textures, could be hidden somehow like HUD in battle/event/etc... or it can be related only to ORK object and not general GUI elements?
My old entry for Indie Game Making Contest 2015
You can check ORK's states there if needed, e.g. to see if the player can be controlled:
if(!ORK.Control.Blocked)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!