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


Menu


It is currently Fri Apr 19, 2019 9:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Values
PostPosted: Tue Feb 05, 2019 6:33 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Sun May 01, 2016 1:36 pm
Posts: 14
Hi there, I can't figure out how I can reduce time values in counters. I've looked over the tutorial on the forum and I lnow how to add seconds. So I have 10 mins and 30 sec, and what I need to do is that every 1 second reduce 1 second from the time value till it goes to 0 but I can't figure how exactly.


Top
 Profile  
 
 Post subject: Re: Values
PostPosted: Sun Feb 10, 2019 11:21 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5008
Location: UK, Scotland
what are you trying to achieve? What is the goal?

P.S This forum is pretty dead. Everyone is now using a Discord Server. You can join it via the link below. Note that you don't need to download the Discord Client. You can use it through a web browser.

- https://discord.gg/zeHaMuj

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


Top
 Profile  
 
 Post subject: Re: Values
PostPosted: Sun Feb 10, 2019 9:51 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Sun May 01, 2016 1:36 pm
Posts: 14
Well, I want the player to know how much time he's got to finish the mission. At the beginning he has 10 mins and every one min I want to change the value to 9,8,7 etc till it goes to 0. I know how to add them like 11,12,13 etc, but I can't figure how I can decrease the minutes.


Thank you !


Top
 Profile  
 
 Post subject: Re: Values
PostPosted: Mon Feb 11, 2019 11:03 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5008
Location: UK, Scotland
Well when your displaying it you can just take the maximum value like 10 and take away the current time. Or you can have a variable start at 10 and just decrease it each minute.

Code:
every bla bla bla do
begin
 SomeVariable    = SomeVariable+1;
 StringToDisplay = 10-SomeVariable;
 if SomeVariable < 10 then
 enable;
end;


Code:
SomeVariable = 10;

every bla bla bla do
begin
 SomeVariable = SomeVariable-1;
 if SomeVariable > 0 then
 enable;
end;

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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