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


Menu


It is currently Mon Oct 23, 2017 9:50 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: What to do
PostPosted: Sun Feb 27, 2011 3:59 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
I think this is why
http://forum.stucuk.net/viewtopic.php?f=94&t=1647&hilit=filterunitsinarea

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 27, 2011 4:50 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
I tried it. It's still not working :cry: :cry: :cry:

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 27, 2011 7:11 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Argh, McBenn, there was your post. While giving you a hint I deleted it. xD
Sorry for that.

And the hint was to consider f_exceptarea as a better choice.


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 27, 2011 7:44 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
Ahh so that's why my posts keep disappearing... upsetting a moderator is surely a bad idea XD
It's ok, I can manage :P

f_exceptarea is actually quite a good idea. It removes the needing of so many filters and avoids the odd difference in the filter-functions.

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Mon Feb 28, 2011 5:02 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
Erm... Help?

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Mon Feb 28, 2011 8:16 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
Code:
every 0$1 trigger FilterAllUnits([ [f_exceptarea, Escape],  [f_side, 3], [f_or, [f_type, unit_human], [f_type, unit_vehicle] ] ]) = 0  //If there are no red humans or vehicles on the map (not checking units in area Escape)
and
FilterUnitsInArea(Escape, [ [f_side, 3], [f_type, unit_vehicle] ]) >= 3
and
FilterUnitsInArea(Escape, [ [f_side, 3], [f_type, unit_vehicle], [f_weapon, us_cargo_bay] ]) >= 1
and
FilterAllUnits([ [f_side, 4]]) = 0 do
begin
AddMedal('med1',1);
AddMedal('med2',1);
If FilterAllUnits([ [f_side, 3], [f_alive]]) = 10 then AddMedal('med3',1);  //You forgot a comma
If FilterAllUnits([ [f_side, 3], [f_alive]]) = 9 then AddMedal('med3',2);  //You forgot a comma
If FilterAllUnits([ [f_side, 3], [f_alive]]) < 9 then AddMedal('med3',-1);  //You forgot a comma
GiveMedals('Main');
SaveCharacters(Gacsam,'Gac.');
SaveCharacters(r7,'Pokr.');
YouWin;
end;

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Mar 13, 2011 10:19 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
Now question, how can I save these cars?

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Mar 13, 2011 10:42 am 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Using SaveVariable.


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Tue Apr 12, 2011 11:35 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
It's too hard for me :cry:

I need help with:
1. How can I restrict weapons like: us_crane and us_bulldozer but letting the us_cargo_bay be build?

2. Saving cars at 2nd mission and loading it in 5th.

3. Saving characters at 1st mission and loading them in:
a) 2nd Mission
b) 3rd Mission
c) 4th Mission
All of them have to be loaded from 1st mission, they are different characters, and these 3 characters should be saved and loaded in 5th mission.
So this is how it looks:

1. I need to make the player be able to build only us_machine_gun or us_cargo_bay, no other.

2. Saving cars at 2nd mission and loading it in 5th, they should be between:
Chasis: us_light_wheeled or us_medium_wheeled
Engine: Combustion
Control: Manual
Weapon: us_machine_gun or us_cargo_bay

3.
a) Character saved at 1st mission, loaded in 2nd (now I need to save 2 characters because there is 'captain' which I need to save), saved and loaded in 5th.
b) Character saved at 1st mission, loaded in 3rd (now I need to save 2 characters because there is 'captain' which I need to save), saved and loaded in 5th.
c) Character saved at 1st mission, loaded in 4th (now I need to save 2 characters because there is 'captain' which I need to save), saved and loaded in 5th.

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Wed Apr 13, 2011 12:02 am 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
As far as I know you can only directly restrict technologies and buildings, not vehicle components. A way to deal with it indirectly is to cancel the construction of an "illegal" vehicle as soon as it commences. E.g. like
Code:
On VehicleConstructionStarted(factory, chassis, engine, control, weapon) do
  begin
    if weapon in [us_bulldozer, us_crane] then
      ComCancel(factory);
  end;


I can't find a way to directly save a car like you save a character, but you can always save a list containing the vehicle's data as a variable using "SaveVariable". "SaveCharacters" you use to save human units.
You load the variable saved with "SaveVariable" using "LoadVariable". You can load a character in multiple ways, f.x. "CreateCharacter", "CreateCharacterSet" and "CreateCharacterWithClass".
Check out the functions in the 'Identify' section of the editor or in the wiki.

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sat Jun 11, 2011 1:15 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
Ok, so I'm back to modding :P I've made the SaveVariable, but I am not able to figure out how can I load it :(
That's how I saved it:
Code:
export function Save;
var cars, i, cargotype;
begin
     cars:=[];
     for i in FilterUnitsInArea(Escape, [[f_side,3],[f_type,unit_vehicle]]) do begin
         cargotype:=GetCargoType(i);
         cars:=cars ^ [[GetChassis(i),GetWeapon(i),GetNation(i),cargotype,GetCargo(i,cargotype)]];
     end;
     SaveVariable(cars, 'cars_ru_2');
end;

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sat Jun 11, 2011 7:51 am 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Using LoadVariable.
Believe me, reading Altar's code or the functions reference would tell you everything.


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Wed Jan 02, 2013 1:27 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
Well, it's been a long time, I am going to try making the mod again, I've lost it after re-installing Windows (dumb me). Also the mod will be a Russian campaign (I'm 75% sure),
Wish me luck, and I'll try to keep up to date :D
btw. Long time no see :mrgreen:

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Wed Jan 02, 2013 9:42 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
Good luck :)

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4

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