It is currently Fri Jul 30, 2021 10:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Tip for beginner sailers
PostPosted: Tue May 10, 2011 2:54 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
I came across an important experience...

Time ago, I wanted to create my own code for a mission I created just for fun. Since I left back to the future's development, now I create random mods of the game in private. After some time, I lost some practice with SAIL, but remembered some processes, so as I was saying at the first of this text, I worked on a code I made, where I had a For syntax. (For x=1 to 6) but the problem was that in some part I had (For z in MyList), I got confused. I also didn't place Begin and end inside the for, IMAGINE! So finally I ended up with something which worked at 1/6 of what I wanted, yes, in that case there was a group of soldiers I wanted to spawn at a certain point.
Well, today I payed attention, and this is my tip:

Stick to your knowledge, don't try to be an hero on sail, if you go slow, but steady and safe, you will be most likely to reach the goal. You see, I published many functions in OWS' functions/code section, but by the time I passed without sailing, I lost some of my knowledge, so when I tried to reproduce the work with Lists, I messed it up.
So Keep it Simple, stupid! (The 'KISS' saying).

And for those curious peep, here's the part of the code I'm talking about:

Code:
var v,s;
EXPORT function AlliedReinforcements;
begin
PrepareReinforcements1;
Wait(0$1);
  for v=1 to Reinforcements1 do
  begin
  PlaceUnitArea(Reinforcements1[v],Reinf1Area,false);
  ComAgressiveMove(Reinforcements1,68,57);
  end
end;

Export Reinforcements1;
var z,sol;
Export function PrepareReinforcements1;
begin

  Reinforcements1 = [];

  for z=1 to 6 do
  begin
    uc_nation=nation_american;
    uc_side=4;

    hc_sex=Rand(1,2);
    hc_class=class_soldier;
    hc_skills=[Rand(2,3),Rand(1,2),Rand(1,3),Rand(0,2)];
    hc_name='';
    hc_attr=[10,10];
    sol=CreateHuman;
    Reinforcements1=Reinforcements1 union sol;
  end
end;

_________________
-Aleph.

THE Very active person

"You can only do well at something if you put the time in. Doesn't matter what subject it is. You can't make a master piece over night."
Wise man Stu-


Top
 Profile  
 
 Post subject: Re: Tip for beginner sailers
PostPosted: Tue May 10, 2011 7:07 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
My tip would be to tell them to start with hell simple things and try to figure out how it actually works by themselves.
Looking at Altar's code is beneficial.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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