OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Colonel_Klink on 04 Aug 2003, 10:39:04
-
Now I searched both here and at the Official Forums and couldn't find any thing to create a continuous animation for the radar on the blockhouse that i am currently refurbishing while recovering from a sickness (just attacking the simpler addons these days :) )
Anyway here goes:
If people can remember the old radar station I made eons ago.. which was an ambitious project using tank classes to get the animated radar antenna and screen to work.. Once 1.91 came out I have been asked if I was going to update the addon. Well I thought I might, and also make the addon more user friendly in both editor and in map making. The animation is made continuous using the following code:
In your config.cpp Class Animations:
class Radar
{
type="rotation";
animPeriod=0.01;
selection="radar";
axis="osaradar";
angle0=0;
angle1 = 6.283161;
};
The addon init eventhandler:
init = [_this select 0] exec "\addonname\radar.sqs";
And the animation code in radar.sqs:
_radar1= _this select 0
#Reset
_PosRadar =0
_radar1 animate ["radar", 0]
?(not alive _radar1):goto "exit"
#loop
~0.01
_posradar= _posradar + 0.010
_radar1 animate ["radar",_PosRadar]
?(_posradar<=0.99): goto "loop"
goto "reset"
#Exit
exit
The above gives a nice steady rotation which doesn't reverse rotate, and continues until the radar is dead.
And a piccy:
(http://www.dc3d.co.nz/Graphics/OFP/radar2.jpg)
-
That is very nice idea. i remember when i unpacked your addon ;D ;D,there was a class named i think something like SAM. So did you tried to make SAm or i am wrong
-
Will this be a working radar?
A radar script would be neat...Something that attached a marker to every vehicle...Naturally just for the guys inside to see, the script could be used in CTI too....
-
can i make a Suggestion?
If i can here it is...
_radar1= _this select 0
#Reset
_PosRadar =0
_radar1 animate ["radar", 0]
?(not alive _radar1):goto "exit"
#loop
~0.01
_posradar= _posradar + 0.010
_radar1 animate ["radar",_PosRadar]
?(_posradar<=0.99): goto "loop"
goto "reset"
#Exit
exit
maybe this may work better
_radar1= _this select 0
_posradar = 0
?(not alive _radar1):goto "exit"
#loop
_radar1 animate ["radar",_posRadar]
_posradar= _posradar + 0.01
~0.01
?(_posradar >= 1): _posradar = 0
?(not alive _radar1):exit
goto "loop"
-
Complicated.... Bresseb had an easier way.... just put this in the config:
class eventhandlers
{
init="(_this select 0) animate [""ani_radarDome"", 1]";
};
this will animate the Dome in the beginning...
Then put some huge numbers in to the animation field in the angle and time, like this:
class ani_radarDome
{
angle0=0;
angle1="-20000 * 3.141592654";
type="rotation";
animPeriod=100000; selection="radar_dome";
axis="radar_dome_axis";
};
This way the dome will rotate for hours... (Saving game might srew this up, I haven't tried... :-[ )
-
Welcome,
accoding to similar situation i wanted to ask about help in problem. Noone seems to know answer.
here's the description of problem:
http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=e0f24a32bbd87677e66fb0a15ed34322;act=ST;f=3;t=41857 (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=e0f24a32bbd87677e66fb0a15ed34322;act=ST;f=3;t=41857)
i'll addd screenshot - all i want is to make this soldier to don't stop after he'll make two steps included in animation.
-
Colonel_Klink
Where Can I find your addon ? IS there new beta or something available ?
-
This thread is now being unstuck, information from this thread has been submitted to the Editors Depot in the form of a document.
Link is Here (http://www.ofpec.com/editors/resource_view.php?id=824)
Planck