OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: JasonO on 09 Jul 2006, 00:25:54
-
I cant find an effect to make a player feel tired after a period of time.
I have a script to loop until it gets to 0, then I am stumped on what to do.
Is there any effects to feel dizzy or tired?
Thanks ;)
-
Try "The Forest" (link in signature), When player gets sick check the effect. If you want something similar, depbo the mission and get sick.sqs, check also sick class in the description.ext file.
-
Try "The Forest" (link in signature), When player gets sick check the effect. If you want something similar, depbo the mission and get sick.sqs, check also sick class in the description.ext file.
OK thanks I will check it out.
When finished and want a editing break i will probably play the mission ;)
-
I did and wow that's a weird mission. My mind is playing tricks on me., were you inspired by Lost?
:P Great atmosphere & great camerawork 8)
-
LOL Blanco, weird? just a bit unusual :P
Jason, forgot to say, sick.sqs also makes the player puke (sometimes), if you use this just remove all the code related to "drop" commands.
-
I can make the puke work ok, is this the only effect because I just get errors in my map saying "resource title sick not found".
I have modified both description.ext to work with my mission. Im not sure if I have removed something I still need.
Below are the 2 scripts
My description.ext :
Respawn = "BASE";
RespawnDelay = 30;
class CfgMusic
{
// List of music tracks (.ogg files without the .ogg extension)
tracks[] = {introsong};
// Class definition needed for each music track
class introsong
{
// Name to display in mission editor
name = "introsong";
// Music path, volume, pitch
sound[] = {\music\introsong.ogg, db + 0, 1.0};
};
class RscText
{
type = CT_STATIC;
idc = -1;
style = ST_LEFT;
colorBackground[] = {0, 0, 0, 0};
colorText[] = {1, 1, 1, 1};
font = "SteelfishB128";
sizeEx = 0.05;
};
class RscTitles
{
class sick
{
idd=-1;
movingEnable=true;
duration=3;
name="sick";
controls[]={"fondosick"};
class fondosick : RscText
{
style = ST_CENTER;
x = 0;
y = 0;
w = 1;
h = 1;
text = "";
colorBackground[] = {0.5, 0, 0, 0.2};
};
};
};
My sick.sqs :
;sick.sqs by Mandoble
_dur = 1
_rot = 1
_mass = 1.5
_vol = 1
_color = [[1,0.6,0,1],[0.8,0.6,0,1],[0.7,0.4,0,1],[0.6,0.4,0,1],[0.7,0.5,0,1],[0.8,0.6,0,1],[1,0.7,0,1],[1,0.6,0,1]]
_size = [0.05,0.05,0.2,0.2,0.1,0.3]
_nums = 0
sick=true
#sonido
? !sick: goto "salvado"
_dmg = damage player
player setDamage (_dmg + (random 0.15))
? _nums == 3: cutText["\n\n(I'm feeling so weak ...)", "PLAIN DOWN"]
titleRSC ["sick","Plain Down",100]
player switchMove "FXToKneel"
~1
_timeini = time
#puke
_ang = getDir player
_pos = [(getPos player select 0)+sin(_ang)*0.4,(getPos player select 1)+cos(_ang)*0.25,0.9]
_vel = [sin(_ang)*0.7, cos(_ang)*0.7, 0]
drop["cl_water","","Billboard",100,_dur,_pos,_vel,_rot,_mass,_vol,0,_size,_color,[1,0,1,0,1],1,0.1,"","",""]
~0.1
?(time - _timeini)<3:goto "puke"
goto "levantar"
#wait
~3
#levantar
player switchMove "FXFromKneel"
titleRSC ["Default","Plain Down",100]
;~(15 + random 10)
~(30 + random 20)
_nums = _nums + 1
goto "sonido"
#salvado
exit
For the sick.sqs i removed anything refering to sounds, since I dont want these in my mission.
I havnt been doing basic scripting for long, so it would explain why it dosent work. :P
Thanks for your help.