It is currently Thu Nov 26, 2020 2:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Counters
PostPosted: Wed Jan 31, 2007 4:20 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
How can I add counters to the mission?
Where I should put the text for them?

I'll try to answer these questions in my tutorial.

Step 1:
Extract file Texts/Counters.wri (or Texts/#LNG/Counters.wri where LNG is a short form of your language name) to your mod's directory.

Step 2:
Look into extracted file. This is a part of it (english version):
Code:
Am06-1
  Crates to collect: %d

Am06-2
  Remaining time: %t



Step 3:
Add your own text. Example:
Code:
identifier
You will win a car in %t minutes.

Identifier is an identifier which you will use in SAIL.
Remember: First and last line have to be empty. Lines between every counter also have to be empty.

Step 4:
Use correct value type in text of counter.
%d is used for numerical values
%t is used for time values

Step 5:
Add counters to the mission.
It's the simplest step. Just add this to the code:
Code:
display_strings=['#identifier',value];

You can also display more than one string.
Code:
display_strings=['#identifier',value,'#identifier2',value2];

Remember about ' ' and # before identifier.

Values can change.
Code:
//beginning of the code
EXPORT timer_value;

//somewhere in code
every 0$1 do
begin
timer_value=timer_value+0$1;
display_strings=['#identifier',timer_value];
enable;
end;

Code above will add 1 to the value every second. You can also reduce values.
Note: I've added 0$1 because it's time value. For numerical values use 1.

---------------------------------------------

Polish version soon.


Last edited by Radzio on Fri Feb 02, 2007 8:32 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Counters
PostPosted: Wed Jan 31, 2007 9:16 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
Great job!! Thanks a lot!! :D :D

_________________
-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:
PostPosted: Wed Jan 31, 2007 9:25 pm 
Offline
Soldier level 5
Soldier level 5
User avatar

Joined: Sun Sep 24, 2006 8:26 pm
Posts: 1015
Location: Łódź, Poland
Good work, BIG Thx Radzio :D .

_________________
Who dares wins
www.bullets4u.org - site of {B4U} multigaming clan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 2:47 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
I want to help other modders by sharing my knowledge. :D


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 5:44 pm 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Wed Nov 01, 2006 2:04 pm
Posts: 392
Location: Poland, Wrocław
If I want to set timer to countdown I write [/code]...
timer_value-1;
...
Code:

 :?:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 5:53 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
Yes, timer_value is just an example.

Code:
//you write this inside every
your_value=your_value-1;
//and the rest of code


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 8:35 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
Tutorial updated. Mistakes corrected :D


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 11, 2007 6:36 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
I wonder how can I use a command to change the time of the Game.. timer_value don't works as a command for that because it is just a varible..

_________________
-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:
PostPosted: Mon Feb 12, 2007 12:31 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
You can't change the actual game time.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 6:48 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
stucuk wrote:
You can't change the actual game time.

But how the guys of altar did on the Beta base attack of the russian campaign's mission?

_________________
-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:
PostPosted: Mon Feb 12, 2007 5:14 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
I don't understand you. Do you want to know what code they used to prepare an attack on Beta base? Maybe it's not their code but I would use it when needed:
Code:
EXPORT timer_value;

every 0$1 do
timer_value=timer_value+0$1;

every 0$0.5 trigger timer_value=0$30 do
begin
// attack ;)
end;


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 6:23 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
:? No, no. I've said that I need to change the time automatically of the game during a cinematic.. How did the guys of Altar in that Ru.X.. mission did that? I don't understand their language, if someon knows how they did, it would be great to post the code here.

_________________
-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:
PostPosted: Mon Feb 12, 2007 6:32 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
You need to explain what you mean or noone can understand you.

You can not physicaly change the actual game time. You can create timers.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 6:39 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
I still don't understand what you mean. Cinematic? Changing time? Describe more clearly what do you mean.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 8:11 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
While you're with the command "InGameOn" you're in cinematic mode(I think), so, what do I need is to change the time directly in SAIL (With a code) as one can't control the game during cinematic mode.

_________________
-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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

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