OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Surdus Priest on 04 Dec 2007, 12:56:01
-
where can i find the script in the arma folder which is called by the enableEndDialog command?
what i want to do is edit it so make my custom end dialog.
ps i wasnt sure if this was advanced enough for advanced scripting
-
I'd guess you'd need an addon with the alternate end dialog in it. You could put an onLoad handler in this new version, to call your script in order to update it with whatever you want to change in it. Problem is that all missions would see this new dialog if the addon was installed. You could make any extra controls invisible at the start and only show them if your script was called (in your mission, that is). Frankly, though, I'd be afraid of potentially messing up every other mission...
-
Edit: I'm assuming you're wanting to change the player's death animation, since in ArmA the only place enableEndDialog is ever used is when the Player dies. :) Of course, if you want to go about changing the actual -dialog- displayed with the enableEndDialog command, I have no idea, but I'm guessing it'd involve modifying way too many core files for comfort.
Actually, all you need to do is create a script named onPlayerKilled.sqs in your main missions' folder, and put everything that happens on the player's death in there. :good:
Here's some good reading:
Event Scripts (http://community.bistudio.com/wiki/Event_Scripts)
Wolfrug out.
-
actually i was thinking on the lines of making a replica of the enddialog. all i would need are the commands for the buttons; quit, replay mission, load auto, and load.
then i was hoping that someone could tell me the location of the original so i could copy paste it into a script i can call to activate in the onplayerkilled.
-
enableEndDialog is only used in two scripts, death1.sqs and deathDefault.sqs
Both of these files are held in ca\data\scripts.
Planck
-
i found them, but what does the command call? where is the script or config that it calls?
-
My understanding is this is just a command that enables the load, retry, or quit dialog to appear when the player dies and the onPlayerKilled script is run.
Placing this command in your own onPlayerKilled script will enable those buttons.
At a guess I would say the code that the command runs to achieve this is part of the game .exe as indeed the command itself is.
Planck
-
drat... ok then, we may have to move this onto advanced scripting.....
i need advise on how to replicate the buttons which appear on enableEndDialog.