Goto https://www.stucuk.netGoto https://www.atlanticaonlinewiki.comGoto https://www.game-requirements.com


Menu


It is currently Sun Aug 19, 2018 1:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: CreateHumansAndVehiclesInArea
PostPosted: Tue Mar 09, 2010 5:23 pm 
Offline
Soldier level 2
Soldier level 2
User avatar

Joined: Wed Jul 22, 2009 2:16 pm
Posts: 124
Location: Europe
CreateHumansAndVehiclesInArea
Creates the willing amount of humans and vehicles, places the vehicles in area and then places the humans into the vehicles.
Code:
export function
CreateHumansAndVehiclesInArea(side,nation,sex,class_n,lev,chassis,engine,weapon,qty,area);
var i,un,veh;
begin
  uc_side:=side;
  uc_nation:=nation;
  uc_direction:=Rand(0,5);
  vc_chassis:=chassis;
  vc_engine:=engine;
  vc_control:=1;
  vc_weapon:=weapon;

  case class_n of
    1: PrepareSoldier(sex,lev);
    2: PrepareEngineer(sex,lev);
    3: PrepareMechanic(sex,lev);
    4: PrepareScientist(sex,lev);
    5: PrepareHuman(sex,5,lev);
    8: PrepareHuman(sex,8,lev);
    9: PrepareHuman(sex,9,lev);
    11: PrepareHuman(sex,11,lev);
  end;

  for i=1 to qty do
  begin
    un:=CreateHuman;
    veh:=CreateVehicle;
    PlaceUnitArea(veh,area,false);
    PlaceHumanInUnit(un,veh);
  end;
end;

Code explanation:
side - unit's side
nation - unit's nation
sex - human's gender, 0 if it has to be random
class_n - human's class
lev - human's skills
chassis - vehicle's chassis
engine - vehicle's engine
weapon - vehicle's weapon
qty - the quanity of desired units (i.e. qty=10 will create ten humans and vehicles)
area - the area to place units in

Example:
Code:
CreateHumansAndVehiclesInArea(1,1,0,3,5,5,3,7,3,spawn1);

The code above will create three American mechanics (side: blue; gender: random; skills: lv5) and three rocket launchers (chassis: morphling; engine: siberite), then it'll place the vehicles in specified area (spawn1 in this case) and place the mechanics into these vehicles.

_________________
Image


Last edited by ph3nom on Tue Mar 23, 2010 6:42 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: CreateHumansAndVehiclesInArea
PostPosted: Tue Mar 09, 2010 8:18 pm 
Offline
Soldier level 1
Soldier level 1

Joined: Mon Jan 11, 2010 5:36 pm
Posts: 56
Location: Brno, Morava/Morawy/Moravia, CZE
Gj man, why are weapons like balista, snipe, flamer and mortar made of so, cause they attack through the armor? Where can I find this weapons settings? I see vehicles file, but there is nothing about this. Think, that you know this.


Top
 Profile  
 
 Post subject: Re: CreateHumansAndVehiclesInArea
PostPosted: Wed Mar 10, 2010 6:34 am 
Offline
Soldier level 2
Soldier level 2
User avatar

Joined: Wed Jul 22, 2009 2:16 pm
Posts: 124
Location: Europe
All Original War's constants can be downloaded from here: LINK

Quote:
why are weapons like balista, snipe, flamer and mortar made of so, cause they attack through the armor?

I don't know exactly what're you talking about. The last four classes in the code are sniper, mortar, bazooker and desert warrior but they can't attack through the vehicle (if you meant that).

_________________
Image


Top
 Profile  
 
 Post subject: Re: CreateHumansAndVehiclesInArea
PostPosted: Wed Mar 10, 2010 7:27 am 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Wed Nov 01, 2006 2:04 pm
Posts: 392
Location: Poland, Wrocław
?

Sniper does. And so do other weapons, but only few are really efficient. Like previously mentioned snipers, ballistas, flame-throwers etc.


Top
 Profile  
 
 Post subject: Re: CreateHumansAndVehiclesInArea
PostPosted: Wed Mar 10, 2010 6:18 pm 
Offline
Soldier level 1
Soldier level 1

Joined: Mon Jan 11, 2010 5:36 pm
Posts: 56
Location: Brno, Morava/Morawy/Moravia, CZE
This weapons attack through armor (mean tanks with driver): balista, sniper, mortar, flamer and little bit rocket launcher. My question is where are setting for there guns.


Top
 Profile  
 
 Post subject: Re: CreateHumansAndVehiclesInArea
PostPosted: Wed Mar 10, 2010 8:23 pm 
Offline
Soldier level 2
Soldier level 2
User avatar

Joined: Wed Jul 22, 2009 2:16 pm
Posts: 124
Location: Europe
I see 8)

Settings (parameters) for flame throwers, rocket launchers and ballistas are located in Data/GameInit/vehicles.txt
Sniper's settings are in Data/GameInit/people.txt

_________________
Image


Top
 Profile  
 
 Post subject: Re: CreateHumansAndVehiclesInArea
PostPosted: Wed Mar 10, 2010 11:56 pm 
Offline
Soldier level 1
Soldier level 1

Joined: Mon Jan 11, 2010 5:36 pm
Posts: 56
Location: Brno, Morava/Morawy/Moravia, CZE
Yes i know this, but im finding, where is settings for this through weapons, basista have same dmg like machine gun, but attack people in vehicles like other snipe, flamer and mortar too. I want to do all "light weapons" includes all machine guns and gatling gun so, as though would be attack people in tanks.


Top
 Profile  
 
 Post subject: Re: CreateHumansAndVehiclesInArea
PostPosted: Thu Mar 11, 2010 8:13 am 
Offline
Soldier level 2
Soldier level 2
User avatar

Joined: Wed Jul 22, 2009 2:16 pm
Posts: 124
Location: Europe
I'm not sure but I think it cannot be modified. It's probably hardcoded (?)

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Original War is an RTS / RPG game by Altar Games
Original War Support is not part of Altar Games but is maintaining Original War for Altar Games

Privacy Policy