Home   Help Search Login Register  

Author Topic: surrender-script  (Read 1500 times)

0 Members and 1 Guest are viewing this topic.

Trasher

  • Guest
surrender-script
« on: 01 Aug 2004, 21:22:29 »
im making an escape mission and i need some help so  can anybody tell me if there are any script tht does this if you the bad guy gets hit an action thingy gets up and it says surrender and when you press you raise yor hands and freezez and then you go to spectating (the mission is a coop and 2 players plays as fugitives plz help  :D

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:surrender-script
« Reply #1 on: 01 Aug 2004, 21:36:07 »
Add an Eventhandler "Hit", add an action, do an animation and launch the spec script. Tadaa!

:beat: *Gets Shot* :beat:

EDIT: Oh, and FEAR the allmighty Allram Est!! ;D ::)
« Last Edit: 01 Aug 2004, 21:36:37 by The Real Armstrong »

Trasher

  • Guest
Re:surrender-script
« Reply #2 on: 01 Aug 2004, 22:49:52 »
but that part that the action appears when you get hit ???

there is no crazy banana it just a happy banana  ;)   :P  ;D
btw are you a swede ??
« Last Edit: 01 Aug 2004, 22:50:20 by TrasheR (swe) »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:surrender-script
« Reply #3 on: 01 Aug 2004, 22:54:47 »
Add eventhandler "hit" to the player.

When the player is hit the eventhandler launches a script.

The script adds an action to your action menu.

When you click on the action it launches another wee script that does the animation and launches the spectator.


Oh, and Armsty isn't a swede, he's a turnip.    ;D  


Oh yes, the old ones are the worst.
« Last Edit: 01 Aug 2004, 22:56:07 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:surrender-script
« Reply #4 on: 01 Aug 2004, 22:57:32 »
Read the Eventhandler tute in ed depot.

I am no more swede than myself, because I am the man of the non-swede who was swede, except the fact that he wasn't, but he was, but only on wednesday and on saturdays between 12 and 4 o'clock. Oh, and only people who are bourn the 8th of August can see me as a man, the others see me as a talking orange. Very nasty anyway.

:beat: *Gets Shot* :beat:

Trasher

  • Guest
Re:surrender-script
« Reply #5 on: 02 Aug 2004, 08:49:53 »
more details plz  ??? im not good at this shit

Trasher

  • Guest
Re:surrender-script
« Reply #6 on: 02 Aug 2004, 15:16:31 »
ok know i know how to make the eventhandler and a action thingy but now i have a prob The Polices should have a respawn in base thingy but the badguys should launch the kegety spectating thingy ! is it possible even to use 2 different respawn types in a mission ???
 
i found an anim for hands..... FXexecution but its just "plays" it and then you stand like normal i want it to keep being on knees do you understand  

sry for my bad english  :-*
« Last Edit: 02 Aug 2004, 16:32:05 by TrasheR (swe) »

Trasher

  • Guest
Re:surrender-script
« Reply #7 on: 02 Aug 2004, 21:20:34 »
come on plz help on this on anyone PLZ PLZ  :D

Offline Nemesis6

  • Members
  • *
Re:surrender-script
« Reply #8 on: 02 Aug 2004, 23:21:09 »
This switchMove "FXstandsur"
I am actually flying into a star... this is incredible!

Offline Roni

  • Members
  • *
  • Play the Game !
Re:surrender-script
« Reply #9 on: 03 Aug 2004, 01:53:56 »
From what I can tell you can't have multiple respawn methods in a mission but like everything else in OFP you CAN fake it !

For instance, you could have instant respawn but have a script running on the character checking for !(alive player).  Every time the player dies you can add to a counter and once the target number of deaths is reched you simply forceEnd to the mission.

Or, you can make Instant respawn with the above check routine.  Once the player dies wait for him to come back to life (alive player) then immediately teleport him to wherever you want him to be - a spawn point, an object, your group leader, the nearestBuilding or whatever.

Hope that this helps.

Trasher

  • Guest
Re:surrender-script
« Reply #10 on: 03 Aug 2004, 19:43:38 »
ok but could this happen instead when you press surrender it plays the animation it comes a text like "player 1 surrended" and then you get teleported to the "Jail" ??? if this works could somebody tell how to write it or give me that teleport-script ??? and i not a big prob but if you are hit by more than 1 "bullet" several surrender menus appear  anyways thx for the hlp guys  ;D
« Last Edit: 03 Aug 2004, 19:47:13 by TrasheR (swe) »

Offline Roni

  • Members
  • *
  • Play the Game !
Re:surrender-script
« Reply #11 on: 04 Aug 2004, 03:40:28 »
Hi Trasher

Something like this -

; this exec "surrender.sqs"
; execute via "hit" eventHandler or player addAction

_player = _this select 0

_player switchMove "FXstandsur"
_playSound "DontShoot" ; optional, need to find proper sound name (see below)

~4 ; pause for effect

_player setPos (getPos jail) ; go to jail, go directly to jail . . .
_player setDammage 0 ; healed player damage at jail hospital



That should do it.  Of course you will need an object named "jail" (no quotes) for the player to be teleported to.

There is a default "don't shoot" sound in the game.  To find out what it's called simply set up a trigger with the sound as an Effect, hit Save Mission and check out the mission.sqs.  Go back and delete the trigger and change the sound above to whatever the trigger said it should be.

Cheers



Roni

Trasher

  • Guest
Re:surrender-script
« Reply #12 on: 04 Aug 2004, 15:32:12 »
ok its working but i have 2 probs left im using ECP and the First aid thingy comes up even if you got full health at "Jailhospital" and the action "surrender" is still there plz assist  :D heres the script'

removeallweapons player

~2

_player = _this select 0
player switchMove "FXstandsuruniv"
playsound "isurrender"

~10

_player setPos (getPos prison)
player setDammage 0
player switchmove "Null"

thx for the help roni
« Last Edit: 04 Aug 2004, 15:33:01 by TrasheR (swe) »