How can i simulate those flashings via scripting? Is it possible?
Just the required function for ASC or a pretty link for a tutorial, will be accepted.
I looked for a function at the ZDoom Wiki, but i found nothing...
Thanks for help.
Code: Select all
fadeto(0, 0, 0, 1.0, 0.0);
delay(35);
fadeto(0, 0, 0, 0.0, 0.0);He means in ACS, not console.DrewbieDoobie007 wrote:you can do this through the console by changing r_visibility to a large negative value like -50 to -100, you could bind it to an alias and activate it by a keystroke but other than that it is beyond my expertise, dunno if you could implement such a thing via ACS. I use an increased r_visibility and change the testcolor to green attached to a console alias to get a nightvision scope effect.
Offtopic (Spanish): ¡Qué pasa tío!Karnizero wrote:Yet another question:
I need a function to set max player health to a certain quantity. Is that possible?
Because SetActorProperty(PlayerNumber(), aprop_Health, 50) [for example), gives the player 50 points, but that is not the maximun allowed.
Thanks.
[Offtopic (Spanish): ¿Tío, dónde estás metido que ya no te pasas por Arcades3D? Venga, un saludo y cuidate.]JacKThERiPPeR wrote:
Offtopic (Spanish): ¡Qué pasa tío!
Ontopic: You should do something on DEHACKED, but I don't think that should work for Heretic as I've seen your work.
Code: Select all
int MaxHP = 25;
inf CurrentHP = 0;
scrip 1 (void) {
CurrentHP = GetActorProperty (PlayerNumber(), aprop_Health);
if ( CurrentHP < MaxHP ) { /*actual HP is lower than MaxHP*/
if ( (CurrentHP + 15) > MaxHP ) { /*lets see if the healing vial gives us more than MaxHP*/
SetActorProperty (PlayerNumber(), aprop_Health, MaxHP);
} else {
SetActorProperty (PlayerNumber(), aprop_Health, CurrentHP + 15);
}
} else { /*actual hp is more or equal to max allowed*/
print (s:"You take the vial, but you see that you dont need"); /*optional line*/
Thing_SpawnSpot("MyHealingVialActor", PlayerPosX, PlayerPosY); /***Insert code for spawn item at player location***/
}
TakeInventory ("MyHealingVialActor", 1); /*remove the item from inventory*/
}The one drawback is that fadeto fades the entire screen, including the HUD, console, etc. For a brief flash this is fine, however if you want the user to still be able to see chat messages, console, etc while "blinded" for a longer period of time, a simple blank graphic being hudmessage'd to the screen is a better solution.jallamann wrote:fadeto() is far easier and more compact than using a texture...