Home   Help Search Login Register  

Author Topic: [SOLVED]POLITE REQUEST - A Simple spawn script or/and advice please  (Read 1243 times)

0 Members and 1 Guest are viewing this topic.

Offline Ducatisto

  • Members
  • *
  • I'm a noob at this!
Hello, please can someone help me understand better how to write a reasonably simple spawn script. Yes, I have searched and I have de-PBO'ed many missions, but many spawn scripts are tied in closely to their missions and for someone who does not understand scripting (believe me when I have tried tutorials) I am struggling with this.

My scenario is that I am having a populated town (OPFOR) and upon me reaching a trigger (can it be player only and not just WEST?) will spawn a group (out of view) and just "pile-in" with the action? I have looked at that UPS script by Kronzky and that offers a lot so would that be able to be incorporated into this? Say a group gets spawned at a particular location and executes the UPS script so that they patrol the area where there are OPFOR?

OR, would it be better if the group was spawned at the start of the mission and via a trigger (I don't know how to get around that), they move off towards the said battle area? Ideally I would like the trigger to be player only activated and not West as I do have patrolling aircraft and on my previous attempts the aircraft activated the triggers.

Please forgive me as youth is not on my side and no matter how I start reading a tutorial somehow not a lot is absorbed!

Duca
« Last Edit: 08 Oct 2008, 20:15:30 by Ducatisto »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: POLITE REQUEST - A Simple spawn script or/and advice please
« Reply #1 on: 08 Oct 2008, 10:06:51 »
Certainly you may solve that without scripting.
Create your group somewhere and give it two waypoints, first quite close to its starting position, and the other at the battle area. Now place a trigger detecting you and draw a sync line between that trigger and the first wapoint of that group. The group will keep waiting at its first waypoint until the trigger is activated and then the group will proceed to next waypoint (battle area).

Offline Ducatisto

  • Members
  • *
  • I'm a noob at this!
Re: POLITE REQUEST - A Simple spawn script or/and advice please
« Reply #2 on: 08 Oct 2008, 13:53:08 »
Many thanks for your help, some say it is so easy but for those with no or little knowledge it is difficult. I will put into practice what you have written, thank you again.

[EDIT] I did as you stated but unfortunately it was triggered by an aircraft flying over the trigger. Is there a way that ONLY the player can trigger the attack?[/EDIT]

Duca
« Last Edit: 08 Oct 2008, 14:11:01 by Ducatisto »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: POLITE REQUEST - A Simple spawn script or/and advice please
« Reply #3 on: 08 Oct 2008, 15:05:21 »
Group the player with the trigger (F2 - drag line), and in the new Activated By drop-down box in the trigger select "vehicle" (=player).

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Turk

  • Members
  • *
Re: POLITE REQUEST - A Simple spawn script or/and advice please
« Reply #4 on: 08 Oct 2008, 16:55:44 »
Hello,

The UPS script you are using is a great script and indeed what you are trying to do can be done with UPS.

Lets say you want 10 enemy units to spawn at marker 'A' once a specific unit enters the trigger, well all you do is give the specific unit a name, in this case UNIT1. Create a trigger, set it to BLUFOR (if the unit belongs to blufor) and in the condition field add.

Code: [Select]
This && UNIT1 in thislist
Next create the enemy unit and give it the name ENEMYUNIT1 and hide him away from the action. Now instead of adding the code to the INT field of the enemy unit you add it to the triggers On Act field so it looks something like this.

Code: [Select]
nul=[ENEMYUNIT1,"A","random","min:",10,"showmarker"] execVM "ups-f.sqf"
Now when UNIT1 from Blufor enters the trigger ENEMYUNIT1 will move from his hidden location to marker 'A' and another 10 enemy units will randomly spawn within marker 'A'.

I've added a little demo at the bottom of this post if you want to take a look.

Turk.

Edit: Instantly move from his location to the marker!
« Last Edit: 08 Oct 2008, 17:07:39 by Turk »

Offline Ducatisto

  • Members
  • *
  • I'm a noob at this!
Re: POLITE REQUEST - A Simple spawn script or/and advice please
« Reply #5 on: 08 Oct 2008, 17:15:37 »
Many thanks for your assistance Turk (and Wolfrug). I will try that as soon as I have cleaned the house, the perils of a single dad!  :blink: