Home   Help Search Login Register  

Author Topic: Creating Garrisons, Creating Airdrop Reinforcements, Creating A Money System  (Read 1939 times)

0 Members and 1 Guest are viewing this topic.

Offline Beagle

  • Members
  • *
  • OFPARMAFTW!
Hey - first post on OFPEC, site looks great so far I have to say, already read some interesting stuff on here  :D

The reason for my post is I'm aiming to make a big mission - one where you start off in one of the tiny little islands at the south-west corner of the Sahrani Map (e.g. Isla de la Caja?), and go from island to island, town to town taking over all the bases/towns in the entire map. It works a bit like a single player CTI - You get money from holding towns, you order units and build up your forces, etc...

My problem is I have all these ideas for how I want my mission to work that I really want to use, but I have trouble with the scripting side; I'm still a pretty novice editor and so I run into a lot of problems when I'm trying to get stuff to work. Mainly stuff I've seen work before in other missions and am not sure how to get it working from scratch in my own.  :blink: So I was hoping that if I ask for help on the forums I might be able to get some expert advice...

There's three problems I've run into right now, and I'm still pretty early on in the mission:

First, I imagined that itd be too laggy to simply put all the enemy troops on the map at the start of the mission seeing as there would be hundreds of them (I'm aiming for it to be a really big mission ;D) so I wanted to put triggers in every town/base so that when BLUFOR gets close to them, that's when a script creates all the units in the town. I'm pretty sure this is how the old MFCTI in flashpoint created resistance fighters in every town when enemies approached.

But I ran into problem just trying to use createUnit  :dry: this is the script i wrote and was trying to use:

_______________________________________________________________________
rahmadiair1 = creategroup East
ra1 = rahmadiair1 createUnit ["SquadLeaderE", position rahmadiairlogic, [], 0, "FORM"]
ra2 = rahmadiair1 createUnit ["TeamLeaderE", position rahmadiairlogic, [], 0, "FORM"]
ra3 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]
ra4 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]
ra5 = rahmadiair1 createUnit ["TeamLeaderE", position rahmadiairlogic, [], 0, "FORM"]
ra6 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]
ra7 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]
exit
________________________________________________________________________

It created all the units at the Game Logic i specified, but they didnt respond when i shot near them? and when i shot them and killed them, ArmA crashed to desktop. I'm guessing my script has a lot of glaring errors in it >:( can someone please point me to a good tutorial on how to create a group of soldiers to garrison a town? or explain whats wrong with my newbie script...

Second problem is about reinforcing the player's army. The idea i came up with was i wanted all that stuff done through airports - for example, first the player has to take an airstrip, like the one on Rahmadi island.
Next, you order the troops through a building or an officer like you would in MFCTI, and it costs money depending on what you order. (You guessed it - I'm not exactly sure how to do this either.)
The way the troops are delivered is: once they are ordered, helicopter/s (uh60) are created at the corner of the map, with all of the troops you ordered in cargo. they take about 1 minute to get to the airstrip, where they drop off your troops and then fly away to be deleted once they're far enough away.
I was planning to use a paradrop.sqs script i found on the site to airlift in vehicles, and for aircraft they would just fly in and come under your control.

So - how could I learn how to set up that kind of purchasing system, and again my previous trouble with the createUnit command would be a problem when I'm trying to createUnit this blackhawk full of the troops you ordered ... and i'm not sure how to set waypoints for a unit I have created in a script, for example setting a "transport unload" waypoint for the blackhawk? how can i go about doing this?

Third, is the aforementioned money system. I've seen it working in MFCTI in flashpoint but I'm not sure where to start figuring out how to do it... any help on making this money system (getting money for holding towns, using it to purchase troops and equipment) would be greatly appreciated!!

Well, pretty long post with some long explanations, sorry if they're newb questions but I needed some help... hopefully if someone can help me I can move on to bigger and better problems  :P

Thanks!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
An example, and dont forget that to create an East group you need to have at least an east unit placed in the map from the editor, if not you'll need to createCenter east first. You'll need to place "markermove" and "markercycle" on the map too.

Code: [Select]
rahmadiair1 = creategroup east

rahmadiair1 addWaypoint [getMarkerPos "markermove", 0]
rahmadiair1 addWaypoint [getMarkerPos "markercycle", 0]
rahmadiair1 addWaypoint [getMarkerPos "markermove", 0]

[rahmadiair1, 1] setWaypointType "MOVE";
[rahmadiair1, 2] setWaypointType "MOVE";
[rahmadiair1, 3] setWaypointType "CYCLE";

ra1 = rahmadiair1 createUnit ["SquadLeaderE", position rahmadiairlogic, [], 0, "FORM"]
rahmadiair1 selectLeader ra1
ra1 setRank "SERGEANT"
ra1 setskill 0.5;

ra2 = rahmadiair1 createUnit ["TeamLeaderE", position rahmadiairlogic, [], 0, "FORM"]
ra3 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]
ra4 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]
ra5 = rahmadiair1 createUnit ["TeamLeaderE", position rahmadiairlogic, [], 0, "FORM"]
ra6 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]
ra7 = rahmadiair1 createUnit ["SoldierEB", position rahmadiairlogic, [], 0, "FORM"]

{if (_x != ra1) then {_x setRank "PRIVATE";_x setSkill 0.2};_x setBehaviour "AWARE"} forEach units rahmadiair1

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
money system is somin very easy.... :P

u just put a vari and add and dudct from n to it :D

like money = 0

if player captures da town u put

money = money + num

nd hell have wat he needs :D

same tin 2 deduct... just use da - instead of + :P

ohh btw :D

WELCOME 2 OFPEC

:cheers:

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Beagle

  • Members
  • *
  • OFPARMAFTW!
Thanks guys! I'll try some more editing tonight and hopefully get some better results - again thanks a ton!!  :D

Offline Beagle

  • Members
  • *
  • OFPARMAFTW!
Flags
« Reply #4 on: 07 Aug 2007, 09:35:24 »
Hey - a new question just popped up.

I've got flags at the center of town implemented so the player can capture towns, and the enemy can capture them back. But the problem is, I don't know the names of different flags so I can't setFlagTexture properly!

Does anyone have a list of the names of the different flags so I could use them in conjunction with setFlagtexture?

Also, does anyone know the names of all the music tracks so that I can play them using a script, instead of picking them in a trigger?

Thanks!! You guys have been awesome explaining how to solve those last problems :D

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
West = \ca\misc\data\usa_vlajka.pac
South = \ca\misc\data\jih_vlajka.paa
North = \ca\misc\data\sever_vlajka.paa

That should do it.

 :yes:

Planck
I know a little about a lot, and a lot about a little.

Offline Beagle

  • Members
  • *
  • OFPARMAFTW!
Thanks Planck! Got those flags up and flying now  :D

I've got a crude reinforcement system going - the helicopter flies in with what you've ordered. But at the moment I've only made certain preset groups - for example, the player can order a Basic Infantry group, or Assault Inf, or an AT squad... but he doesn't have control over the individual makeup of that group. I'd like to input something more customizable.

I'd like to be able to use a system similar to CTI - where you actually pick the individual units you want to make up your group. So...

Is it possible for the player to have a process where he creates the ideal group by first selecting the units he wants, and then finalizing the order, at which point the selected troops are flown to him and join him? Is it possible to do this without a huge amount of scripts?

Thanks to anyone who can reply!

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
its posible... but it will need scripting...  :P

wat u need is dialogs... and 2 learn how 2 use em... check dis TUT

most of da stuff here is right 4 ArmA 2... if its not just ask in da forums

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta