OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Cap on 26 Mar 2003, 13:40:16
-
It is a sqs file named "Timer"
In the init field of a trigger i have...
[] exec "Timer.sqs"
And yes the trigger is activated cos i have my CTF script activated there and that works fine.
It wont show my hints,
and it wont end the mission when Param1 is hit (this is done in another script if you are wondering where it is.
I just dont think the timer is being activated.
And yes my description.ext is set up properly (i hope) :-\
here it is take a look......
#Start
?Param1 == Timer: Goto "End"
~1
?Param1 - timer == 60: hint "1 min left"
?Param1 - timer == 120: hint "2 min left"
?Param1 - timer == 300: hint "5 min left"
?Param1 - timer == 600: hint "10 min left"
?Param1 - timer == 1200: hint "20 min left"
timer = timer + 1
goto "start"
#End
exit
Thanks in advance
-
Another few points
- When i load the mission it does not say that it cant find the "Timer.sqs". which is strange because it should, if it cant find it that is.
- This is my description.ext
respawn=base
respawndelay=20
titleParam1 = "Time Limit";
valuesParam1[] = {100000, 300, 600, 900, 1200, 1500, 1800, 2700, 3600, 7200};
defValueParam1 = 1800;
textsParam1[] = {"Unlimited", "5 min", "10 min", "15 min", "20 min", "25 min", "30 min", "45 min", "60 min", "120 min"};
titleParam2 = "Score Limit";
valuesParam2[] = {10000, 1, 3, 5, 7, 10, 15, 20};
defValueParam2 = 5;
textsParam2[] = {"Unlimited", 1, 3, 5, 7, 10, 15, 20};
class CfgSounds
{
sounds[] =
{
UScore, UCapture
};
class UScore
{
name = "UScore";
sound[] = {"UScore.ogg", 1, 1.0};
titles[] = { };
};
class UCapture
{
name = "UCapture";
sound[] = {"UCapture.ogg", 10, 1.0};
titles[] = { };
};
};
-
x == 60 doesn't work very well in OFP. Try
59.5 <= x <=60.5
or something.
At the beginning of the script put a debugging hint
hint "Timer has started"
so at least you know if the script has started correctly.
-
Ok i did what you said, apart from i made it.....
Param1 - Timer == 61: hint "1 min left"
cos the seconds only clock up in whole numbers cos i used ~1.
I got the hint at the begining, but i thought it was because i put it before #Start. But i did not get any other hints so i put it after #Start to check if the loop was working and it was, i got a hint every second. :P
so the problem is here...
Param1 - Timer == 61: hint "1 min left"
but what is it?
-
And another thing is I am testing it offline in the editor, and i know the description.ext doesn't work in the editor but it does online, BUT I did set...
Param1 = 660; Param2 = 1
In a trigger and the trigger is definatly activated cos it is the trigger i activate "Timer.sqs" in and i get the hint in the begining telling me the timer started.
So does that make a difference (cos i would'a thought i doesn't).
-
description.ext does work in the editor, at least it does for most things. I'm not a real expert though
You don't appear to define Timer anywhere, that could be it.
hint "timer script starts"
Param1=660
Timer=0
#Start
?timer==5:hint "loop working"
?Param1 == Timer: Goto "End"
~1
?(Param1 - timer) == 61: hint "1 min left"
etc
-
you are gay
1. There is nothing wrong with being gay.
2. Nobody likes to hear remarks like that.
Macguba I think you've got it there :)
-
Praise the Lord i think he's cracked it!!! ;D
Yep that was the problem alright, im almost embaresed that i over looked that, it is just such a simple thing that i didn't think to check it cos i was sure i would not have been so dumb as to forget that :o but at least someone has a bit of brains :P thanks guys. :)