It is currently Thu Nov 26, 2020 7:09 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Ow editor
PostPosted: Sat Dec 27, 2014 12:45 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Sat Dec 27, 2014 12:36 pm
Posts: 12
hi, i looked into all modding tutorials and i didn't find how i can make crates to appear randomly... i know how to put crates in game with or without materialize but i don't know how to make the crates appear randomly in the game...


Any help will be appreciated

thx. :D


Top
 Profile  
 
 Post subject: Re: Ow editor
PostPosted: Sat Dec 27, 2014 5:16 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1130
Location: Denmark
You can read about all functions here: SAIL window -> Tools -> Identify.

There are four functions related to spawning crates: CreateCratesXY, CreateCratesXYR, CreateCratesArea and CreateCratesAnywhere. CreateCratesXY places a bunch of crates on a specific hex. CreateCratesXYR places a pile of crates on a random hex within a given distance of a hex. CreateCratesArea places crates on a random hex in an area. CreateCratesAnywhere creates crates randomly on any one valid hex on the map.

_________________
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: Ow editor
PostPosted: Sat Dec 27, 2014 8:25 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Sat Dec 27, 2014 12:36 pm
Posts: 12
The 4 functions are good but i want to spawn crates randomly and a plenty of them, i mean when i use one of the 4 functions is only spawning just 1 crate in the whole game and i want to spawn more than one .


Thx for help


Top
 Profile  
 
 Post subject: Re: Ow editor
PostPosted: Sat Dec 27, 2014 8:39 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Sat Dec 27, 2014 12:36 pm
Posts: 12
Nevermind i got it working
just do this :
every 1$15 do
begin
CreateResourcesArea(1,5,target,true);
enable;
end;


Top
 Profile  
 
 Post subject: Re: Ow editor
PostPosted: Sat Dec 27, 2014 9:20 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1130
Location: Denmark
CreateResourcesArea was also a possibility but you just have to specify the resource type as the first argument. CreateResourcesArea(1,5,target,true) is effectively the same as CreateCratesArea(5,target,true). Just read the documentation in "Tools" -> "Identify".

_________________
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  [ 5 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:  
cron
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