DYOM » Text Tutorials » Make Dinamic Action Key Objective for Your Mission

Make Dinamic Action Key Objective for Your Mission

By nandack

Hi, my nickname is Nandack and wellcome to my first tutorial on DYOM. As we know that you can use +r+ to make red text for DYOM and +w+ to make it white. But do you know that DYOM can show the In-Game action key? For example, some of you use different action key for playing. Mr.A use key W to go forward and A/S to turn Left/Right, but Mr.B use Arrow up to move forward and Arrow Left/Right to turn Left/Right. Imagine if you want to make mission that use Sniper Rifle for killing actor. You can not use fire before pressing the AIM action key. So, you can make an objective to tells the player that he/she must use AIM action key first before pressing the FIRE action key. And how if Mr.A use Left CTRL as AIM and Mr.B use CAPSLOCK as AIM action? You can just write "Use Left CTRL (Default) for aiming before pressing fire" but that's not look nice, am I right? So how we can show DINAMIC action key bassed on User's Defined action key?

Here we go, I like to find some bugs and because I am a programmer too so I open Sanny Builder just the same with CLEO 4 library and I found that in DYOM +r+ means change Text to red but if you open it from Notepade++ or other editors then you'll find that +r+ will became ~r~ so from this method I check the SCM code for Sanny Builder and find that ~k~~PED_DUCK~ is the key for Crouch and ~k~~VEHICLE_HORN~ is for sound the horn. So, by using this technique you can make more real mission and complete info for the users. So in here if user's aim key is RMB then it will show "Use RMB to aim" but if aim key changed to LALT then it shows "Use LALT to aim" something dinamic like that.

Note: This tutorial has been tested using DYOM v.8.1 and CLEO 4.0! And you cannot instanly write ~k~~VEHICLE_HORN~ from DYOM because symbol Underscore is not added since the first time I use DYOM. You can use Notepad or text editor externally.

Example:
You can make an objective that the player must get into the car. You can make new objective and select Add Car. Then on the description box you just write "Get into the car by pressing VEHICLE ENTER EXIT". Finish your mission with all of the objective, after that save it and close your gta.exe then open your saved mission using text editor. Change those capitalized text to ~k~~VEHICLE_ENTER_EXIT~ (Just make sure you capitalize the text from DYOM so you know where is the text that have to be changed). You don't need to write VEHICLE ENTER EXIT, it's just my own method to remember what are the important text. You can write such as KeyEnterVehicle, etc.

List of On Foot keys:
Left = ~k~~GO_LEFT~
Right = ~k~~GO_RIGHT~
Forward = ~k~~GO_FORWARD~
Backward = ~k~~GO_BACK~
Special ctrl left = ~k~~VEHICLE_LOOKLEFT~
Special ctrl right = ~k~~VEHICLE_LOOKRIGHT~
Action/secondary fire = ~k~~PED_ANSWER_PHONE~ / ~k~~PED_FIREWEAPON_ALT~
previous weapon = ~k~~PED_CYCLE_WEAPON_LEFT~
zoom in = ~k~~PED_SNIPER_ZOOM_IN~
aim weapon = ~k~~PED_LOCK_TARGET~
next weapon = ~k~~PED_CYCLE_WEAPON_RIGHT~
zoom out = ~k~~PED_SNIPER_ZOOM_OUT~
group CTRL forward = ~k~~GROUP_CONTROL_FWD~
group CTRL back = ~k~~GROUP_CONTROL_BWD~
conversation - no = ~k~~CONVERSATION_NO~
conversation - yes = ~k~~CONVERSATION_YES~
change camera = ~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~
jump = ~k~~PED_JUMPING~
enter vehicle = ~k~~VEHICLE_ENTER_EXIT~
sprint = ~k~~PED_SPRINT~
fire = ~k~~PED_FIREWEAPON~
crouch = ~k~~PED_DUCK~
look behind = ~k~~PED_LOOKBEHIND~
sneak = ~k~~SNEAK_ABOUT~

List of Vehicle keys:
steer left = ~k~~VEHICLE_STEERLEFT~
steer right = ~k~~VEHICLE_STEERRIGHT~
Steer back = ~k~~VEHICLE_STEERUP~
Steer up = ~k~~VEHICLE_STEERDOWN~
Special control left = ~k~~VEHICLE_TURRETLEFT~
Special control right = ~k~~VEHICLE_TURRETRIGHT~
secondary fire = ~k~~VEHICLE_FIREWEAPON_ALT~
hand brake = ~k~~VEHICLE_HANDBRAKE~
next radio station = ~k~~VEHICLE_RADIO_STATION_UP~
previous radio station = ~k~~VEHICLE_RADIO_STATION_DOWN~
camera = ~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~
brake/reserve = ~k~~VEHICLE_BRAKE~
enter/exit = ~k~~VEHICLE_ENTER_EXIT~
accelerate = ~k~~VEHICLE_ACCELERATE~
fire = ~k~~VEHICLE_FIREWEAPON~
horn = ~k~~VEHICLE_HORN~
vehicle mouse look = ~k~~VEHICLE_MOUSELOOK~


OK, that all of it but remember this:
- DYOM can only support small chars for each objective, if you write something like a poem than if the max char is reached so the other char will not be printed on the screen. So make sure that you can imagine the proportion of it.
- DYOM also show "+k++VEHICLE HANDBRAKE+" when you edit the objective that has been edited externally but I am not what the meaning of that space between VEHICLE and HANBRAKE because when I use space on it then it shows nothing, so for now let's just use external editor.
- Make sure you use v8.1 because so many improvements and new features on it also support the CLEO library v.4 and better objects.

Don't forget to rate if you think it is not a bad tutorial but if you find any question just send me your question via profile comment and if I'm online and I know the answer then I will answer it. Thanks for reading my first tutorials.
Or you can check my twitter : @NandackCahyo

Statistics

Startdate
Jul 20 '14
Last Update
Jul 20 '14
Views
3885

Rating(5):

Rated 5 times, Average 4.8

Log in add your rate