Home   Help Search Login Register  

Author Topic: custom death script  (Read 6990 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
custom death script
« on: 18 May 2005, 17:06:46 »
okay you may think this should go into the cutscene board but im asking within a script i have called
onplayerkilled.sqs
wich activates when the player is killed i want it to target the player than show the end dialog.
I can do that so far but then after that i want it to have a shot of the person who killed the player how would this be done

would it be done with an even handler if so how.
is it just passed through the scipt and reconised by ofp.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:custom death script
« Reply #1 on: 18 May 2005, 17:14:41 »
What you propose is exactly what is done by one of the two default death scene scripts.   I have a feeling the killer is returned automatically, I can't remember.

Look at what BIS has done and base your script on that.  

If you happen to have downloaded a certain mission which I daren't mention again by name, unpbo it and see how things were handled there.   It had four custom death scripts, two by BIS, one by Sui and one by me.

As a general point, yes, the killed EH returns who the killer was.   There is stuff in the ED about how this works, read up on it.
« Last Edit: 18 May 2005, 17:15:05 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline 456820

  • Contributing Member
  • **
Re:custom death script
« Reply #2 on: 18 May 2005, 17:16:46 »
well im looking at 2 different ones and they are both done like a script parameters such as
_player
_killer

and it uses that all the way through the script but i notied in the mission there is no trigger with the parameters in brackets.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:custom death script
« Reply #3 on: 18 May 2005, 17:21:08 »
Yes, that's what I mean about them being returned automatically.     When the onplayerkilled script is launched it, the array _this contains the player and the killer.    But it's all done by the game engine, you don't need a trigger.
Plenty of reviewed ArmA missions for you to play

voodzia

  • Guest
Re:custom death script
« Reply #4 on: 18 May 2005, 18:46:37 »
I also have a question related to this topic so won't start a new one. So I can change the ending cutscene - that's cool - but what about the ending dialog - this red one - "you are dead". Can I change it either?
Thank you in advance for your reply.
Kind regards,
voodzia

p.s
Btw, default "onPlayerKilled.sqs" script can be found in "your_OFP_folder\Dta\scripts.pbo".

Offline 456820

  • Contributing Member
  • **
Re:custom death script
« Reply #5 on: 18 May 2005, 19:34:31 »
you miht be able to change it but im not sure how to do that all. i can edit it by using title text and or cutrrs commands basically adds custom text fonts to it.
But if you give me a while i might be able to find out how to change it if its possible.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:custom death script
« Reply #6 on: 18 May 2005, 19:58:44 »
If your just trying to make a script for this editing the scripts.pbo wont be nessacary.

Just make a trigger and put in the condition: !(alive player) and in the activation:titletext ["You fat head you died! \nWhat a newb! Ah ha ha ha!","Plain"]

Easy.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline 456820

  • Contributing Member
  • **
Re:custom death script
« Reply #7 on: 18 May 2005, 20:03:21 »
that wont work because that text will be followed by the endgame view screen the only way to do it is either edit it using title text's and pictures and so on unless i can be bothered to have alook in that mission wich has some custom death screen

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:custom death script
« Reply #8 on: 18 May 2005, 20:25:22 »
I think you probably could.   That end dialogue is called by a command in the onplayerkilled script and you don't have to have it.     You could certainly create you own dialogue and call that instead.

However, the problem is that the endDialogue is very powerful and has options like "Load" and "Retry".    I doubt it's possible to recreate these with scripting commands.   In other words, by not having BIS endDialogue, you are fundamentally altering what happens when you get killed.

Now there isn't necessarily anything wrong with that, although it will annoy a lot of players.    The important thing is that the replacement is in some way better than the original.

Because of this risk of leaving the player stranded, I would suggest that you do not attempt this unless you are already an experienced dialogue maker.

What would be fine would be your own dialogue first, followed by the BIS one.     If you wanted to give the player different options then you could make one of them to call the normal endDialogue.
Plenty of reviewed ArmA missions for you to play

Offline Roni

  • Members
  • *
  • Play the Game !
Re:custom death script
« Reply #9 on: 18 May 2005, 23:34:44 »
Hi Number Man

Check out a file in your OFP BIN folder called stringtable.csv.  This is actually a simple Excel file that contains a summary of all of the things that you see and here in the game.

The OFP engine doesn't actually tell itself to print "You are Dead" when you die.  Instead, it tells itself to print STR_MISSION_KILLED.  The engine then checks your default language and looks up the apporopriate output in the above file.  If your language is English then the output is "You are Dead".  If it is German then you get "Sie sind tot.", Spanish "Ha muerto." etc.

Although it's easy to do, I haven't got around to stuffing around with this file yet as I am not sure how it affects MP play.  I don't think that it should make any difference though - all this file does is change how YOU see things, not anyone else.

I'm sure that if I play on line with someone in Spain then his OFP will say "Ha muerto", whereas mine will say "You are dead" - no problems.  Also, I don't think that there is much opportunity for cheating if your version of OFP says "Idiot, get in the damned car" rather than something else !

Try saving a copy of this file to someplace safe, then changing any or all of the entries in the English column (column 2).  There are over 2500 entries so you will have do a bit of research to find the ones you want.

(FWIW - STR_MISSION_KILLED is item number 445.)

Cheers



Rory

PS - "You are Dayed.  D-A-Y-E-D - Dayed !

voodzia

  • Guest
Re:custom death script
« Reply #10 on: 19 May 2005, 12:31:57 »
The problem is I don't want to change that string globaly - I'm not making a mod - just a simple SP mission. However I tried to make a simple version of this stringtable.csv file (containing only one entry - STR_MISSION_KILLED) and put it to my mission folder - but it ain't working. Can someone tell me why?

Offline 456820

  • Contributing Member
  • **
Re:custom death script
« Reply #11 on: 19 May 2005, 16:27:53 »
that doesnt go in your misssions folder and since your making a mod it goes in the bin folder wich has the other files that decide what addons are used for what i think

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:custom death script
« Reply #12 on: 19 May 2005, 17:06:34 »
Quote
I'm not making a mod

Quote
since your making a mod

 ;D

You can indeed put a stringtable.csv file in your mission folder.   It is a temperamental file though.   It must have only one sheet.     Whenyou have finished amending it, save it, close it, and save the mission to make the changes take effect.

However, simply putting a line in there with the same name as one of the lines in the stringtable in the bin won't change anything in the game, because the game is looking along the path that takes it to the bin stringtable.
« Last Edit: 19 May 2005, 17:07:58 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline 456820

  • Contributing Member
  • **
Re:custom death script
« Reply #13 on: 19 May 2005, 17:08:15 »
woh jese im such an idiot lol didnt notice that at all must of got it mixed up

voodzia

  • Guest
Re:custom death script
« Reply #14 on: 19 May 2005, 17:56:21 »
Quote
However, simply putting a line in there with the same name as one of the lines in the stringtable in the bin won't change anything in the game, because the game is looking along the path that takes it to the bin stringtable.
What a shame :(
So it seems to me it can't be done easly via script - but actually it doesn't botter me. I'm glad a new lesson was learnt. Thank you all for your great response.
Regards,
voodzia