Home   Help Search Login Register  

Author Topic: Script to annoy Mikero  (Read 831 times)

0 Members and 1 Guest are viewing this topic.

Colossos

  • Guest
Script to annoy Mikero
« on: 01 Jul 2005, 14:37:36 »
We all know how Mikero tests our missions: screw the team , I'll do it myself and than he runs of on his own trying to discover bugs. (No offense Mikero, on the contrary.)
Well, couldnt we all use a script that gives a warning when the player goes too far away from his leader. If he doesnt return in time to formation, the game ends with a cutscene where Mikero gets courtmartialled.

- How do you get the distance between player and leader?
- Can someone pls write such a little script?

Thx,

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:Script to annoy Mikero
« Reply #1 on: 01 Jul 2005, 15:12:37 »
Not to hard, just use one of the distance functions in the editors depot.  Set it on a loop every ten seconds and your done.

Like using snYpirs 2D distance function.

Quote
#loop
 _dis = [getpos leadersname, getpos player] call distancePos
?_dis > 30: goto "end"
~10
goto "loop"

#end
insert cutscene here

This is not tested of course.

Blip :joystick:
« Last Edit: 01 Jul 2005, 15:13:05 by Blip »
...NIGHT WALKER....

Offline 456820

  • Contributing Member
  • **
Re:Script to annoy Mikero
« Reply #2 on: 01 Jul 2005, 16:38:41 »
i just create triggers wich will set the players dammage to 1 so he dies and also make an abident sound of an ak so it apears hes been shot and just do that when the player is present and set several all around the mission area

Colossos

  • Guest
Re:Script to annoy Mikero
« Reply #3 on: 01 Jul 2005, 16:55:41 »
lol 456  , thats also a way to do it  :)

blip thx for the replie, i will try it and let you know if it works

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Script to annoy Mikero
« Reply #4 on: 01 Jul 2005, 16:57:19 »
alternatively, sidestepping the function idea, call the following script -

Code: [Select]
;stick like glue

dist_warn = false

#loop

? (player distance lead_unit_name >= 100) and (not (dist_warn)): goto "warning"
? (player distance lead_unit_name >= 150) and dist_warn: goto "court_martial"

~0.5

goto "loop"

#warning

player sidechat format ["Hey %1! Get your ass back here or there'll be trouble!",name player]

dist_warn = true

goto "loop"

#court_martial

;all the great stuff in here

exit

just to clarify what it does -

it sets a variable to say whether or not the player has been warned. if the player hasn't been warned and gets over 100 meters away, a warning is issued, and the warning variable is set to true. this ensures that the warning doesn't repeat over and over.

if the player then gets over 150 meters away, the court martial begins.

untested, but i think that should do it.
« Last Edit: 04 Jul 2005, 17:12:15 by bedges »

Colossos

  • Guest
Re:Script to annoy Mikero
« Reply #5 on: 01 Jul 2005, 17:15:00 »
Thx Bedges, that will teach Mikero !! I'll make a courtmartial so tough that he'll be afraid to leave his team ever again.  (maybe a LAW rocket right up his *ss)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Script to annoy Mikero
« Reply #6 on: 03 Jul 2005, 04:17:58 »
a bit late, but this is easier

just put a trigger with the distance he is allowed to go from the leader, group it to the player and set it to not present. then run a setpos loop for the trigger (you have to name the trigger)
#loop
trigger1 setpos getpos ((group player) select 0)
~2
goto "loop"

and the on activation line would read:
player setdammage 1

you can also add your sound in there if you want

the ((group player) select 0) just insures that if the leader dies it will follow the new leader

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Script to annoy Mikero
« Reply #7 on: 03 Jul 2005, 10:09:19 »
Or even easier ;)

Put up one trigger, 0/0 size

Condition: player distance leader player > the distance you want
On Act.: player setDamage 1
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Mikero

  • Former Staff
  • ****
  • ook?
    • Linux Step by Step
Re:Script to annoy Mikero
« Reply #8 on: 03 Jul 2005, 11:02:06 »
@Collososs

you may, in time, come to regret this patch of yours. Defeating me, is one thing. Child's play. I may pass you up to higher command, General MacGuba. Now *he* does dreadfull things like shoot his own team members to check if author's *really* know their stuff.

I shall shuffle off now under my rock, having put the fear of Mac into you.

Just say no to bugz

Colossos

  • Guest
Re:Script to annoy Mikero
« Reply #9 on: 04 Jul 2005, 11:26:00 »
The longer this thread stays, the easier the "scripts" get  :). But I'll use Bedges his because I like the syntax.
@Mikero
Don't misunderstand me! I like the way you test missions and I hope you'll keep it up.
Hmmm, sounds like I'm not ready yet to face MacGuba's fury.

This thread is solved, thx all!