Home   Help Search Login Register  

Author Topic: Troubles with drug bust  (Read 828 times)

0 Members and 1 Guest are viewing this topic.

Dubieman

  • Guest
Troubles with drug bust
« on: 13 May 2004, 04:03:28 »
I'm making this police mission where you start out in your Dodge challenger and must drive to this town. Then you have to "ambush" or just walk up to some druggies in the courtyard. They are put into a hands on head animation and say don't shoot. Then 10 secs later the drug dealer pops out and says dumb cop messin with my business die!

Problems: When druggie comes out he doesn't shoot me immediatly. He's grouped to dleted east guy and I'm grouped to deleted Res guy. By the way everyone is civvie or nogovo cop. I'm undercover so I'm civvie. The dofire command doesn't work well. The guy takes like 15 secs to start shootin. ::)
Is it cause some of the druggies are in the way?

                         
D = dealer
p=pothead
u=me

                                      D
                                     
                                         P
                                  P          P
                                        u

That's the line up.

Next: I want to have the druggies get in truck when it arrives after I hit code alpha. How do I un switchmove them? The trigger is okay.

Next:
How can i fix it so player can only approach courtyard one way? Put things there to stop him or something? Otherwise the whole druggies putting hands up and dealer coming out of barn gets very screwy.

PLZ help. :)

PsyWarrior

  • Guest
Re:Troubles with drug bust
« Reply #1 on: 13 May 2004, 12:33:20 »
Greets,

I have done a very similar surrender script for NCPD. The player selects an action in his action menu, and shouts out one of several random phrases (like "Freeze! Armed Police! Put your hands above your head and throw you're weapons on the ground! Do it now!"). Then the enemy puts his weapon on the ground, and performs the surrender anim seen in the OFP credits (where the pilot stands up slowly with his hands above his head, and then puts them behind his head - "FXStandSur...something..."). Each enemy is given a 'courage factor' which determines their resistance to surrender. (E.G. some enemies will always surrender as soon as you yell at them, some will never surrender). As soon as they have dropped their weapon, they are placed into captive status (setCaptive true). If you kill them, the "FX StandSurDead" anim is played.

When the player calls for Radio Alpha, a truck turns up. The hostiles move to the truck and get in.

This is accomplished thus: Truck has two waypoints. One MOVE directly in front of his starting position. One MOVE near where the captives will be. The first wp is synchronised to the Radio Alpha Trigger, so that the truck moves off when Radio Alpha is activated. The script containing the captive boarding control has the following line:
@unitReady truck1

When the truck stops, all captives recieve the commands
_unit switchMove ""
_unit assignAsCargo truck1
_unit orderGetIn true

An alternative way to do it would be this:
_unit doMove getPos truck1
@unitReady _unit
_unit moveInCargo truck1.

You need to put 2 police officers in cargo to start with, or the captives will go in the cab with the driver (hardly realistic). You may also want to place a 'guard' in the back to prevent the prisoners 'escaping'

Quote
How can i fix it so player can only approach courtyard one way? Put things there to stop him or something?
Use an editorUpgrade (Kegeties or Gen. Barron's), and place down fences and structures. Find the editorUpgrades in the Ed Depot.

Quote
Is it cause some of the druggies are in the way?
Maybe. You could UnSwitchMove the druggies, and tell them to setUnitPos "DOWN" to make them hit the deck. Or you could move them somewhere better... ;D

If you like, I'll post the whole script up when I get home (And I actually have it this time).

-Supreme Commander PsyWarrior
-Psychic Productions Studios



Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Troubles with drug bust
« Reply #2 on: 13 May 2004, 16:23:13 »
Psywarrior has answerd most of the stuff but I have something to add on Q 1:

- Try putting skill up to maximum on the dealer.
- Try using the command reveal (in a loop for better effect)

:beat: *Gets Shot* :beat:

Dubieman

  • Guest
Re:Troubles with drug bust
« Reply #3 on: 13 May 2004, 20:08:21 »
Yeah Psywarrior I need that script, it goes good with what I'm doing. :)

I already have kegety's so I'll just put some fencces in like you said.

I may move the pot heads depending on what the dealer does. In the open he shoots immediatly and I usually die if I don't fire fast enough. (You have a glock and dealer has an Ingram)

How do I un switch move them?  this setunitpos up?

I also want them to put satchels down to simulate drug bags when they surrender. Could I just add that in a script to make a bomb appear( bomb won't blow up) or make druggies drop the bomb? :)

PsyWarrior

  • Guest
Re:Troubles with drug bust
« Reply #4 on: 13 May 2004, 21:24:02 »
Unit switchMove ""

and to make them appear to drop a bomb (bag 'o drugs):
 switchMove "combatToPut" (I think. Check this... It may have 'FX' or 'Effect' in front of it). Then use camcreate with "Pipebomb" to spawn the (inactive) bomb. This may look stupid, and I can't test it yet, so just ignore it if it looks bad, and we'll figure out another way (perhaps dropping some ammo, which looks like a pipebomb).

I'll post that script up, if and when I get home (working late today >:()

-Psy|W

[EDIT:] There you go RoachKilla. Note that these are early versions of the scripts which need to be updated (I'll do it when I start working on NCPD again). As a result, the courage factor is not implemented, and there are only two taunts to choose from. Nevertheless, the do work to a great extent, and you should be able to reverse engineer them to get what you want.

HOW TO USE:
One surrender.sqs for every enemy you want to be able to surrender. One taunt.sqs for the player. To see how you work set up a demo mission: Player, some hostile soldiers and an evac truck.
In a trigger:
condition: Radio Alpha
On activation: [] exec taunt.sqs
text: Taunt Enemy...

In init field of all enemies :
[this] exec "surrender.sqs"

Set up another trigger for the truck, as detailed in surrender.sqs comments and above.

Note that these scripts DO NOT use the PSY tag, either for script names or global variables. This is because they are old and archaic.

Enjoy...
« Last Edit: 13 May 2004, 22:50:51 by PsyWarrior »

Dubieman

  • Guest
Re:Troubles with drug bust
« Reply #5 on: 14 May 2004, 01:33:23 »
I'll give it a try.
I don't need that courage thing cause this little druggie thing is only the tip of the iceberg for this mission.

I was hopin to make a Undercover mission resembling Max Payne and have it be at least an hour and a half long.

(car chases, hookers, following a hooker, the bust of drugs, find pimp, bust pimps gunmen, bring in pimp after wounding him badly)
All included hopefully ;) :)

Dubieman

  • Guest
Re:Troubles with drug bust
« Reply #6 on: 14 May 2004, 02:23:09 »
The script works good its just hard to implement when all my messy crap is spread on the editor.

The truck thing is giving me trouble. I did the trigger thing from readme and the truck arrived after a while. Not sure if it was by my waypoints or script. It arrives and dude just sits there with hands up.

Other thing, to remove the action, is it player removeaction [Taunt,taunt.sqs] ?
I only need it for the first part, from then on out, everyone is switching their safeties off. ;D

I have a feeling that I'm going to have to destroy the whole town area and start the drug part from scracth with the scripts. I had this trigger, well four, waypoints, and other stuff plastered all over town... :P ::)

I'm keepin the part where you see this dude standing outside the door after being kicked out. He's saying
"Come on, let me in. I only slept with her twice. C'mon Sharon please!"

Hehehe
« Last Edit: 14 May 2004, 02:25:55 by GuiltyRoachKilla »

PsyWarrior

  • Guest
Re:Troubles with drug bust
« Reply #7 on: 14 May 2004, 10:43:48 »
Quote
The script works good its just hard to implement when all my messy crap is spread on the editor.
Yeah, it's not exactly the easiest script to implement that I've made ::)

About the truck: are you sure the truck enters the trigger (the one that sets off the truckArrived variable)? Put the following after the truckarrived=true
; hint "TruckArrived"

Then preview the mission. If a hint appears saying truckArrived then I don't know what... It could be spelling of something (maybe Truckarived or something), or it could be that the script is messed up. Give me a few moments to examine that bit...

Quote
I'm keepin the part where you see this dude standing outside the door after being kicked out. He's saying
"Come on, let me in. I only slept with her twice. C'mon Sharon please!"
;D
lol...only twice? :P

-Psy|W

FOUND A PROBLEM: the truck must be called evtruck. Forgot to mention that. Try it with that.
« Last Edit: 14 May 2004, 10:46:51 by PsyWarrior »

Dubieman

  • Guest
Re:Troubles with drug bust
« Reply #8 on: 15 May 2004, 16:16:34 »
That would explain it. I didn't see that in the readme hmmm. :hmm:

Should work now, I haven't touched that mission in days. ::)

PsyWarrior

  • Guest
Re:Troubles with drug bust
« Reply #9 on: 15 May 2004, 16:38:53 »
Quote
I didn't see that in the readme hmmm.
That's because I was typing the ReadMe at midnight in 5 mins, and I missed that bit out. I haven't touched these scripts for months, so some things may have slipped my mind...

Hope it works for you now, GuiltyRoachKilla

-Psy|W

Dubieman

  • Guest
Re:Troubles with drug bust
« Reply #10 on: 15 May 2004, 21:45:26 »
Well the truck thing doesn't work still. :(
But I've found another way to do it. I think I will make another script that's activated when the uniformed cops arrive. It'll utilize the un switchmoving of your script but join the guys to the cops and have the cops then jump in their truck and away they go.

I'll then leave the player up to his business of watching clues and such. I think the hooker part comes next with a follow thing after. follwed by a car chase then ending at the pimps stronghold.

Any suggestions for where the pimps stronghold should be on Nogovo? The drug bust took part in Orukoholu. :P

Dubieman

  • Guest
Re:Troubles with drug bust
« Reply #11 on: 15 May 2004, 21:56:09 »
Here's my join script, could you just point out any errors plz.
The cops trigger will set this off and a move waypoint should automatically make the leader say pothead one get in PV3S.



; ***************************************
; Operation Flashpoint Script
; ***************************************
;My script to get the druggies to join the cops and via editor waypoint have the cops drive away.
_pot = _this select 0
_pott = _this select 0

;Want to get dudes to stop switch move animations.
#Join
_pot setUnitPos "UP"
_pot switchMove "stand"
_pott setUnitPos "UP"
_pott switchMove "stand"

_pot join cop
_pott join cop

exit


Anyways should I get rid of pott?
And then apply the script to both? ???

PsyWarrior

  • Guest
Re:Troubles with drug bust
« Reply #12 on: 16 May 2004, 14:31:24 »
Hmm... I don't know what's wrong. It works in my mission (but then again, it was built for that mission alone. Most of my scripts are universal, and don't contain the names of specific units/ mission specific stuff).

But anyway: Instead of ordering the druggies to join the police (?), you could try
_pot assignAsCargo evtruck
_pott assignAsCargo evtruck
[_pot, _pott] orderGetIn true

One error in your script:
Quote
_pot = _this select 0
_pott = _this select 0
Negative. _pot == _pott. Here is "Operation Flashpoint Script"  ::) V2:
; Start --------- evacPrisoners.sqs
_unit = this select 0

_unit setUnitPos "UP"
_unit switchMove "stand"

_unit assignAsCargo evTruck
_unit orderGetIn true.
~30

; safety in case the unit refuses to get in. After 30 seconds, he is forced inside
? _unit in evtruck: exit
_unit moveInCargo evtruck
exit
; End ---------

Execute it by putting [druggie1] exec "evacPrisoners.sqs" and [druggie2] exec "evacPrisoners.sqs" where druggie1 and druggie2 are the names of the prisoners.

If that doesn't work then... it may be that they have to be in the same group as the vehicle they are boarding. Or it may be that I've typed something wrong... :P

Try it... it might work...

Also: what happens with the truck in my script? Do the captives just do nothing again?

-Psy|W

Dubieman

  • Guest
Re:Troubles with drug bust
« Reply #13 on: 17 May 2004, 03:36:13 »
Well its late here so I'll test evrything tomorrow, but with your first script the truck arrives and the trigger is set up and the druggies do their thing except that they don't get in the truck, they simply just sit there and the truck waits there for a long time and then moves on to its next waypoint, the "jail".  Regularly the truck without the script seems to go faster through its waypoints but with the script implemented it pauses for like 20 secs more. Not sure why, maybe your script works its just that the druggies won't unswitchmove. Maybe try making them alert in behaviour or something.....
 :-\
I've figured out the dealer aiming problem though. :)
I had the player come in the courtyard and he sits there yelling and next the trigger with a 15 sec dealy comes on and the dealer comes out with an Ingram and lets loose on the three invisble targets raised to 0.5m so it looks like he goes nuts and trys to kill you with excessive force. Works well unless player leaves targets general vinicity.
 :P