Home   Help Search Login Register  

Author Topic: Need several scripts  (Read 659 times)

0 Members and 1 Guest are viewing this topic.

Philip

  • Guest
Need several scripts
« on: 21 Jul 2003, 16:39:37 »
I am doing a "robber hunt" mission. It's MP and there are 2 robbers and 6 police officers (po). The police are hunting the robbers who try to escape Nogova. I need several scripts, but I don't know how to make them.

Script 1

Player po need a "PLACE ROADBLOCK" command. When they use it an AI controlled po will come in a police jeep from the police station and stop where the player po stands. A block will be created (ie a fence).  The player po who commanded the AI man there will not be in the same group. The player can also order the AI man to take away the block and drive back to the station. Each player po can only use one roadblock at the same time.

Script 2

When a car comes inside a certain radious of a player po (lets say 30 meters) the player can use a "HALT" command. This will work even if the player is inside a chopper. When the command is used a line of text will appear on the screen for everyone inside the radious of the po:

"Stop your car and get out"

If the car driver is AI controlled this then happens.
The AI man will stop his car and gets out. Every AI person in the cargo will do the same. After 5 seconds a new text will be shown:

"Move along"

The driver and the passengers will enter their car again and continue to their waypoint.

When a car comes near one of the roadblocks mentioned in script 1 the same thing will automaticly happen as in this script.

Script 3
If a player po or an AI civilian sees one of the robbers a radio message will be sent to all po with info about where the "wittness" stod when he/she saw the robber.

Script 4
The AI po at the roadblocks will always shoot at the robber and if the robber dies he will stand up and put his hands on his back.
« Last Edit: 21 Jul 2003, 16:43:07 by Philip »

Philip

  • Guest
Re:Need several scripts
« Reply #1 on: 01 Aug 2003, 17:14:10 »
Can someone help me with any of these scripts? I mainly need script 2 and 3.

GrimMonkey

  • Guest
Re:Need several scripts
« Reply #2 on: 20 Aug 2003, 02:13:35 »
Sorry,

I can only help with 1 and 4. For 1 you can set up a trigger activated by a robber. When it's activated have it sychranized with a movement waypoint for a police jeep at the station so it'll move in the road the trigger was near. Try t fiqure it out :).

For 4, somehow have a trigger activate when the robber dies and on 'deactivation' put the FX line in the init. command.

Happy hunting, hope this helps! ;D

evil

  • Guest
Re:Need several scripts
« Reply #3 on: 25 Aug 2003, 05:56:03 »
I think I could help you with script 3.  You want a radio message telling the robbers location... I assume you would want a grid reference (eg. FD17).  I can't do that, but what I could do is have a marker be placed on the map that the robbers wouldn't see, marking their location.  You could have a radio message accompany it.  

"The robbers have been spotted!  Check your map for their location."

Player checks map, sees they are near, say Lipany.  

Would that work?

Offline Burn

  • Members
  • *
Re:Need several scripts
« Reply #4 on: 26 Aug 2003, 06:04:52 »
nr.1)
You could try un pbo Red Hammer campaign, and check that mission where you had to defend a town against some M60's.
In that one you had the option to enforce your positions with wirefences.

nr.3)
This is from LCD's Airstrike_Napalm script:
Name: gridcoordinates_pipe.sqs
Code: [Select]
;calculates the ingame grid coordinates (e.g. Be39) from a position array [x,y,z]
;[<positionarray>, <frontmatter>, <backmatter>, <comchannel>] exec "gridcoordinates.sqs"
;With comchannel you can choose the method of output:
;<comchannel> = ["Hint"]                          --> Hint
;                              ["SideChat", <unit>]    --> Sidechat by <unit>
;Example:
;[GetPos player, "My position is grid ", ". Over.", ["SideChat", player]] exec "gridcoordinates.sqs"

_pos = _this select 0
_xpos = _pos select 0
_ypos = _pos select 1
_frontmatter = _this select 1
_backmatter = _this select 2
_comchannel = _this select 3

?((_xpos < 0) OR (_xpos >= 12800) OR (_ypos < 0) OR (_ypos >= 12800) ): _string = "XxXx"; Goto "SendMessage"

_xcoarserest = (_xpos Mod 1280)
_xslotcoarse = (_xpos - _xcoarserest)/1280                              
_xslotfine =(_xcoarserest - (_xcoarserest Mod 128))/128        

_yslot = 99 - (_ypos - (_ypos Mod 128))/128
                           
_ystring = Format["%1",_yslot]
?_yslot < 10: _ystring = "0" + _ystring

_upper = ["A","B","C","D","E","F","G","H","I","J"]
_lower = ["a","b","c","d","e","f","g","h","i","j"]
_xstring = (_upper select _xslotcoarse) + (_lower select _xslotfine)

_string = (_xstring + _ystring)

#SendMessage
   _output = _frontmatter + _string + _backmatter
   Goto (_comchannel select 0)
   Goto "End"

#SideChat
   (_comchannel select 1) SideChat _output
   Goto "End"

#Hint
   Hint _output
   Goto "End"

#End
   Exit

You can get the hwole script with a example mission here ;)
« Last Edit: 26 Aug 2003, 06:05:44 by Bizon »