Home   Help Search Login Register  

Author Topic: "Creating" Soldiers  (Read 1139 times)

0 Members and 1 Guest are viewing this topic.

Black Magic

  • Guest
"Creating" Soldiers
« on: 29 Sep 2002, 06:35:49 »
I'm not sure how to go about creating soldiers - camcreate command I believe - so could someone tell me how to do it? Also what are the disadvantages of doing this? ???
In case you need the scenario; basically I need 10 men to spawn at a Game Logic then just hang around that area and shoot at my squad as we come through because I've outdone the 63 limit! ::)
Thanks in advanced square pants! ;)

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:"Creating" Soldiers
« Reply #1 on: 29 Sep 2002, 08:25:00 »
Hey Black Magic :)

I think you'll have much more success using createunit than camcreate, as camcreated soldiers have no AI to speak of. The syntax is:

"Soldiertype" createunit [ position, group, init line, Skill, Rank ]

The underlined info (position and group) you must have. The rest are optional. Also for createunit to work you must be creating the unit into an already existing group. (That's the main reason most people go wrong).
So a few examples:
  • "SoldierEMG" createunit [getpos (leader ecattackgrp2),ecattackgrp2,"this moveincargo ecag2bmp",0.5,"PRIVATE"]
  • "SoldierELAW" createunit [getpos (leader ecattackgrp5),ecattackgrp5,"",0.5,"CORPORAL"]
  • "SoldierECrew" createunit [getpos b2mg2, newgrp,"b2mgunner2 = this"]
I'm sure if you have a bit of a play around you'll manage to get it working to your satisfaction ;)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:"Creating" Soldiers
« Reply #2 on: 29 Sep 2002, 10:32:33 »
ThereÂ's also an other way to go round the 63 limit...

I once tried this, itÂ's relly one big pain in the backside if you have a large mission which IÂ'm guessing you have. And also, you can not have the resistance on your side.

-Set the resistance to be friendly with your enemy (or on your side if you want more groups for you...)

-Then place more groups into your map and position them to where you want them. (giving them each a name comes highly recommended. Otherwise you might have some difficulties...)

-Then save the mission and exit

-Make a copy of the mission.sqm file (for the sake of Murphy...), then open the original and edit every single new (named)  unit to be on the resistance side. (I believe it was side=GUER)
Save the edited mission.sqm and reload your mission in the editor. Now you should have over 63 groups on your side and no problems about prewieving the mission.
This should work with the 1.46 (if I just remember correctly...)

Just remember that after you have done this everytime you open up the sqm edited units window it returns to what it originally was...

And also, I didnÂ't test this very far, just with few additional tanks after the limit was met, so I don't know how many more groups you can add this way. I would presume though that thereÂ's a possibility for another 63 groups.

Not the user friendliest way, but give it a try if ya like...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Black Magic

  • Guest
Re:"Creating" Soldiers
« Reply #3 on: 29 Sep 2002, 13:15:13 »
Oho cheers for that Sui! Much appreciated man! ;D
As for Kint, that's a neat little theory you got there but if you're correct about it only working for 1.46 then that cuts me out (1.75). Also Resi is set to friendly with the enemy because I needed the Flak gun and for some odd reason if Resi isn't friendly to the Germans (East) the soldiers go ape shit on me and start aiming at the empty Flak. ::)
Nonetheless I appreciate all the help but this time i'ma go with Sui! :)
PwObLiM sOlVeD!

whiplash2000a

  • Guest
Re:"Creating" Soldiers
« Reply #4 on: 30 Sep 2002, 00:44:53 »
Hi, it's whiplash. been gone for a long time , but i'm back and I'll be better than ever in two weeks from now. I can't help you out a lot right now, but i can tell you that there is a way to "spawn" units. Me and CrashnBurn, well mostly CrashnBurn, worked on this principle for about three weeks and finally got it to work along with a way to tell if the units were dead or alive. It is extremely complicated, but do-ble. I'll have more for you in a little later in the week and a lot more in two to three weeks. Perhaps a nice zip file for the masses to try out. :)