Welcome, Guest Wednesday 16th April 2014, 11:10:46
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: Hot-wire Script (Updated: Dec. 06, 2007) (ACCEPTED)  (Read 2477 times)
0 Members and 1 Guest are viewing this topic.
Rumsfield
*
Offline Offline


I'm a llama!


« on: 17 Nov 2007, 23:11:28 »

Updated!

I am new here, so I hope I placed this in the appropriate thread.

Purpose: I thought it was silly how in an ArmA/OFP mission a player could get inside a vehicle and drive off. In real life vehicles usually require a key to unlock and to start the engine. However there is also the possibility of hot-wiring a vehicle, which is what my scripts intend to simulate(poorly).

Feedback: I have created a test mission with my hot-wiring scripts implemented. I would appreciate some feedback of all types, so I can improve it if necessary. The type of feedback I am looking for is as follows:
-Any bugs/glitches encountered?
-How difficult was it to hot-wire a vehicle(too easy?, too hard?, just perfect?)
-Was hot-wiring the vehicle fun or boring or neither?
-Was hot-wiring the vehicle too unrealistic or appropriate for a game environment?
-Do you feel hot-wiring the vehicle was unnecessary and is too much of a hassle?
-Suggestion, if any?

Thank you very much for testing this for me, everyone is welcome to download this test mission and give feedback.


Updated! (Dec. 06, 2007)
Changes:
-Added Event Handlers
-Cleaned up description.ext
-Removed hot-wire instruction manual from mission briefing, and added it to the dialog menu
-Start engine button is disabled until Step 2 is completed.
-When Step 2 is completed, all Step 2 circuits are disabled to help player focus only on final step.
-In Step 2 you no longer are required to have the exact randomly selected circuit in the named circuit selection box for all three circuits(Spooner mentioned this as a bug, so I made it simpler.).


Updated! (Nov. 27, 2007)
Changes:
-Graphical user interface
-Completely new scripts


Screen shot:



Download Test Mission:

The .zip file below is Mission Editor ready:

OFPEC DOWNLOAD
« Last Edit: 10 Aug 2009, 19:21:34 by hoz » Logged
Mandoble
Editors Depot
Administrator
*****
Offline Offline



WWW
« Reply #1 on: 17 Nov 2007, 23:41:20 »

Hi Rumsfield and welcome. You did post in the correct forum, but it would be much better for any tester to have your mission in zip format and ready to be tested from the editor, not just pbo. Consider also the option to attach your mission to the message which is available via "Additional Options" for any post.

Aside of that I would say hot-wiring might add a good bunch of tension to some missions and it would be definitively a good adition.
Logged

Rumsfield
*
Offline Offline


I'm a llama!


« Reply #2 on: 17 Nov 2007, 23:51:00 »

Thanks Mondoble,

I added the zipped editor ready file as you recommended.
Logged
Mandoble
Editors Depot
Administrator
*****
Offline Offline



WWW
« Reply #3 on: 18 Nov 2007, 01:10:15 »

I did test it, and while I like the original idea, I dont like at all the way it is implemented. Basically, by adding and removing actions there is no way to hotwire anything correctly as you need to scroll down to the new action in less than half a second to select it, and then the action is just removed and replaced by a new one. So, the interface to hotwire anything is not adecuate at all, IMO. Also, damaging the electronics of a vehicle should not imply its destruction and the death of the player. And a monitor script should be running there to ensure the actions are only available when the player is the driver of a vehicle, not from outside and not when the player is not the driver.
Logged

Rumsfield
*
Offline Offline


I'm a llama!


« Reply #4 on: 18 Nov 2007, 04:01:08 »

Thanks for the quick reply,

Let me address your comments:
Quote
Basically, by adding and removing actions there is no way to hotwire anything correctly as you need to scroll down to the new action in less than half a second to select it, and then the action is just removed and replaced by a new one. So, the interface to hotwire anything is not adecuate at all, IMO.
Thanks you pointed out something I overlooked, which is that I should have made clear the proper(easier) technique to hot-wire. It is very possible to do it and I will explain the proper way now.

First, approach the vehicle, use the mousewheel to highlight "Get In Vehicle". When you are inside you should notice that the title-text "*HOTWIRE*" is presented in the bottom middle of your screen, just press "Enter" to begin. If for some reason it is not presented in the bottom center area of your screen, use the mousewheel to highlight it, then press "Enter".

Second, once "*HOTWIRE*" is activated you never need to use the mousewheel again. Use only the "Enter" key to navigate through the Hot-wiring process. I must point out that if you miss the timing and make your selection too slow, the action menu in the lower right corner of the screen is activated. In which case it is best to wait for 5 to 10 seconds and it will return to the lower center of your screen, do not use the mousewheel when the action menu is active or it will increase the time it takes for the action menu to disappear.

Quote
Also, damaging the electronics of a vehicle should not imply its destruction and the death of the player.
I agree, however in real life improperly hot-wiring a vehicle may damage the vehicle and I want a hefty penalty for failure in the hot-wiring process. As for the death of the player, I agree the player should not die, so I will probably automatically eject the player from the vehicle when a mistake is made to avoid player death.

Quote
And a monitor script should be running there to ensure the actions are only available when the player is the driver of a vehicle, not from outside and not when the player is not the driver.
Yes I could add a check to make sure the player is the driver. I do already have a check to see if the player is inside or outside the vehicle as shown below:
Quote
;(Check to see if player inside vehicle.)
? !( _playerX in _vehicle) : Hint "HINT: You must be inside the vehicle to hotwire it!", exit

Thanks for the useful comments. Everyone is welcome to test it and give feedback, keep them coming. My goal is to create a method to hot-wire a vehicle which is fun, challenging, and not over-complicated.
Logged
LCD
Former Staff
****
Offline Offline



WWW
« Reply #5 on: 18 Nov 2007, 09:15:40 »

gave it a quick test... mebe its cuz im lil hangovered... but i cudnt hotwire even 1 of em... aqs da actions change rapidly from some reason it didnt agree 2 choose da right 1 (i pressed when da H showed... but it didnt move 2 da next letter... but on da oder hand it didnt make electrical problems... so i didnt do it wrong....)

also u may wanna consider making hotwiring somin more fancy (use dialogs.... i like dialogs) for example u cud look at da radar thing i made in my mision (go to american radar and hack it) if u dont wanna ill make an example mision... basicly i used a picture of a cutter and made da player "cut" wires.... but u cud develop da idea more....

LCD OUT
Logged

"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta
Mandoble
Editors Depot
Administrator
*****
Offline Offline



WWW
« Reply #6 on: 18 Nov 2007, 11:37:57 »

There is a missing action here, if you dont have the keys to turn on the engine of a vehicle, then you dont have the keys to open the door. You might have two actions available: Force Lock and Hot-Wire contacts. You may apply them in squence to locked vehicles. That is, if the vehicle is locked and you cannot get in, add an action to Force Door Lock. If you manage to open the door, then you may add the action to hotwire the contacts.

The script used to force the lock of the door may do just the following:
- Whatever check to determine the success unlocking the vehicle.
- If success, remove the unlock action and check in a loop if player is driver.
- If driver, add the action to hotwire the contact and wait till the player is not the driver.
- if the player is not the driver remove the hotwire action and wait again for player is driver condition to add the action again.

All the above done in the unlock door script.

On a side note, to make easier the life of the testers try use Rahmadi map instead of Sara.
Logged

Rumsfield
*
Offline Offline


I'm a llama!


« Reply #7 on: 18 Nov 2007, 19:28:17 »

Thanks for the comments, I am now seriously considering redoing this from scratch. I will probably use a GUI dialog like LCD mentioned. I am drawing a blank on trying to think of a fun and challenging way to implement hot-wiring. I thought of the possibility of making it ultra-realistic but that would be boring in my opinion, because things in real life that are fun do not always translate into a game environment as fun. If you wish to close this thread, that is ok with me, but I will probably be posting again when and if I make a better hot-wiring method.

Sorry for using Sahrani, it does take forever to load, LOL. I have never timed it, but I believe it takes my PC about 3 minutes to load it.  Angry

@LCD I can't seem to find your mission "American Radar", I used the search function in this forum a few times, but it came up with nothing.
« Last Edit: 18 Nov 2007, 19:39:15 by Rumsfield » Logged
LCD
Former Staff
****
Offline Offline



WWW
« Reply #8 on: 20 Nov 2007, 04:31:43 »

heres da radar thing... 2 sucesfuly hack it u need 2 cut da yellow wire completly and da blue wire only 1ce (dont touch da red wire) and den put da screen on da blue wire... Cheesy

bout da mision... da radar in question is inside my O-Team mision (check my sig line) its not a stand alone mision Tongue

LCD OUT

* hackradar.zip (53.7 KB - downloaded 74 times.)
Logged

"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta
LeeHunt
Former Staff
****
Offline Offline


John 21:25


« Reply #9 on: 26 Nov 2007, 16:41:01 »

hi Rumsfield,

I would encourage you on the hot wire GUI interface if you are still interested.  RPG style dialogs seem to be the way scripting and player demand is going.  I think this thread  has been a decent example of the community offering feedback and guidance to further develop a potential resource so no need to take it down from my point of view  Cheesy
Logged

Rumsfield
*
Offline Offline


I'm a llama!


« Reply #10 on: 28 Nov 2007, 04:05:36 »

I just uploaded my new version, I like it a lot more than my previous version. Please give me some feedback. Anyone at all is welcome to try it.

Thanks
Rumsfield
Logged
Spooner
*
Offline Offline


Mostly useless


WWW
« Reply #11 on: 28 Nov 2007, 10:52:22 »

I'm very impressed you jumped right into making dialogs! Excellent design; 1000x better than the previous version.

Bugs:
- I completed the circuits (got two green lights), but I still didn't get an effect from pressing "start engine".

Suggestions:
- If you use a "GETIN" event handler to add the action to the vehicle and a "GETOUT" event handler to remove the action from the vehicle, then you don't need to worry about people hot-wiring from outside. If in respawning MP, then you need to add/remove a "KILLED" handler on the player in the "GETIN"/"GETOUT" handlers, to remove the action in case the player dies within the vehicle and re-spawns.
- Put a "KILLED" handler on the vehicle to remove the action should the vehicle be destroyed for any reason.
- I wouldn't label the action "*HOTWIRE*". I makes it look like your action is more important than everyone else's and doesn't follow the convention. A simple "Hot-wire" would be fine. Give the action a higher priority, so that it appears at the top of the list, if you want to give it prominence over the other actions.
- Rather than make the mission-maker put the instructions into the briefing, add a large HTML control, with the instructions in it, to the display itself. When the display loads, hide the instructions and have a button to hide/show the instructions control.
- It is the convention to split up your description.ext so that you would just have #include "hotwire.hpp" (just your display definition) in the description.ext and #include "components.hpp" (the base components definition) in the hotwire.hpp. This saves the mission-designer from copy-and-pasting large chunks of text and reduces the probability of errors.
- You might want to disable the start-engine button until you make both circuits and disable all the circuit stuff once the circuits have been closed.

Good luck!
Logged

[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)
Rumsfield
*
Offline Offline


I'm a llama!


« Reply #12 on: 28 Nov 2007, 23:01:50 »

Thanks for the reply Spooner I like your suggestions,

Quote
Bugs:
- I completed the circuits (got two green lights), but I still didn't get an effect from pressing "start engine".

The reason that happened is because you had all the correct wires but the top 3 selected wires were not in the correct box.  It will not let you start the engine until the top three circuits have the correct wires selected to them. Let me explain a little more about that. For example, if you select the blue wire for the power circuit and the red wire for the accessory circuit and the accessory circuit lights up green. Then you must now figure out whether blue is the power circuit wire or red. To do this select another colored wire in the accessory selection box, yellow. Now splice the blue and yellow wires, if the on circuit lights up green, then you now can conclude that blue = power circuit wire, red = accessory circuit wire, and yellow = on circuit wire. I hope that is clear, I should have explained that better in the manual.

I have thought about the bug you experienced, and (although it is not actually a bug, it is just the way I coded it to work), I have decided that I will modify my code so that you do not have to have the specific wire in the specific selection box, you will just be required to have the two green lights lit up.

I am going to try and add all of your suggestions into next version.
Logged
Mandoble
Editors Depot
Administrator
*****
Offline Offline



WWW
« Reply #13 on: 04 Dec 2007, 11:54:03 »

Beware the getin/out event handlers, as they are not executed when you change the position within the vehicle. For example, you getin as cargo and the handler will trigger, now you move to driver position and no getin event will be triggered. if you use the getin event do with a script that follows the sequence:
Code:
waitUntil {(player == driver vehicle player)||(vehicle player == player)};
if (vehicle player == player) exitWith {};
// Add the hotwire action here

waitUntil {player == vehicle player};
// Remove the hotwire action here
Logged

Spooner
*
Offline Offline


Mostly useless


WWW
« Reply #14 on: 04 Dec 2007, 14:19:23 »

I was actually assuming that having a "Can't hotwire from a passenger seat" message wasn't as painful as being told that you couldn't hotwire from outside. Still, you are right that it would be better to just have the action available to the driver.

Actually, your code doesn't work if you get in as the driver, change to passenger and change back (you won't then see the hotwire action any more and would need to get out and back in again). You actually need something like:
Code: (vehicle GETIN handler)
waitUntil
{
    waitUntil {(player == driver vehicle player) || (vehicle player == player)};
    if (vehicle player == player) exitWith {};
    // Add the hotwire action here

    waitUntil {(player != driver vehicle player) || (vehicle player == player)};
    // Remove the hotwire action here

    (vehicle player == player); // WaitUntil
};
Logged

[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)
Pages: [1] 2  All   Go Up
  Send this topicPrint  
 
Jump to: