[Various] Ral22's Proof-of-Concept Corner (Updated: 5/19/14)
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
Consult the Resource/Request Posting Guidelines for more information.
Please don't put requests here! They have their own forum --> here. Thank you!
Before posting your Resource, please make sure you can answer YES to any of the following questions:
- Is the resource ENTIRELY my own work?
- If no to the previous one, do I have permission from the original author?
- If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
Consult the Resource/Request Posting Guidelines for more information.
Please don't put requests here! They have their own forum --> here. Thank you!
- Slax
- ... in rememberance ...
- Posts: 2121
- Joined: Tue Oct 19, 2010 7:01 am
- Location: Window office.
- Contact:
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
Watch Hard Target. Should be a good inspiration source for this project.
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
Would you mind adding this to your thread?
I would really love to see how you made smooth elevators.
Sorry for the bump, I hope it isn't too much..
I would really love to see how you made smooth elevators.
Sorry for the bump, I hope it isn't too much..
- Ozymandias81
- Posts: 2069
- Joined: Thu Jul 04, 2013 8:01 am
- Graphics Processor: nVidia with Vulkan support
- Location: Mount Olympus, Mars
- Contact:
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
Hi Ral22, I have just 1 thing to say to you: THE RAIN STUFF IS AMAZING! So, I need your permissions for using it for my project Gore. Is it OK for you?
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
I won't be posting that whole example in here, since it is the basis of my current project and it won't be shared until that is released. I will release the script for that elevator since I'm not 100% happy with it. (I wanted it to be a universal script, but it actually has to be specific to each elevator. As long as you're cool with that, you can use it.) Check the main post for the script. And don't worry about the bump.Leonard2 wrote:Would you mind adding this to your thread?
I would really love to see how you made smooth elevators.
Sorry for the bump, I hope it isn't too much..
Yeah! Sure you can use it. That's why I released it. If it's something I've released, anyone is free to use it with some proper credit.Ozymandias81 wrote:Hi Ral22, I have just 1 thing to say to you: THE RAIN STUFF IS AMAZING! So, I need your permissions for using it for my project Gore. Is it OK for you?
- Ozymandias81
- Posts: 2069
- Joined: Thu Jul 04, 2013 8:01 am
- Graphics Processor: nVidia with Vulkan support
- Location: Mount Olympus, Mars
- Contact:
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
Thankx!!!!Ral22 wrote:Yeah! Sure you can use it. That's why I released it. If it's something I've released, anyone is free to use it with some proper credit.
- Ozymandias81
- Posts: 2069
- Joined: Thu Jul 04, 2013 8:01 am
- Graphics Processor: nVidia with Vulkan support
- Location: Mount Olympus, Mars
- Contact:
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
Hi ral22, it's me another time... I'm just trying to tweak the rainy codes in order to get them useful via external libraries, because I have rain, snow, bloody rain & acid rain wheater effects in my megamod... Here's what I'm doing at the moment:
THE SLIGHLTY MODIFIED SCRIPT: (for now only normal is defined)
THE ACTORS INVOLVED:
The fact is that I need some on/off scripts inside maps, something like take/giveinventory tricks or similar, or even better only while raindrops hits the player (argh!). As it is now, the script loops continuously even if I give/take RainTokens... Any hint? Any clue? Thankx.
[EDIT]: ATM I've solved it using acs_execute/terminate inside maps scripts (I'm using hexen's format for now...) + this numbered (not named) library...
[EDIT]: Done.
THE SLIGHLTY MODIFIED SCRIPT: (for now only normal is defined)
Code: Select all
#library "ral22sfx"
#include "zcommon.acs"
bool rainswitch = TRUE;
script "RainSwitchCheck" ENTER
{
int RAIN;
RAIN = CheckInventory("RainToken");
While(True)
{
if(RAIN==1)
{
rainswitch=TRUE;
}
else
{
rainswitch=FALSE;
}
delay(1);
}
}
//normal
str rainhit1[10] =
{
"RAIN1",
"RAIN2",
"RAIN3",
"RAIN4",
"RAIN5",
"RAIN6",
"RAIN7",
"RAIN8",
"RAIN9",
"RAIN10",
};
//bloody
str rainhit2[10] =
{
"RAIN11",
"RAIN12",
"RAIN13",
"RAIN14",
"RAIN15",
"RAIN16",
"RAIN17",
"RAIN18",
"RAIN19",
"RAIN20",
};
//acid
str rainhit3[10] =
{
"RAIN21",
"RAIN22",
"RAIN23",
"RAIN24",
"RAIN25",
"RAIN26",
"RAIN27",
"RAIN28",
"RAIN29",
"RAIN30",
};
//snow
str snowhit[10] =
{
"SNOW1",
"SNOW2",
"SNOW3",
"SNOW4",
"SNOW5",
"SNOW6",
"SNOW7",
"SNOW8",
"SNOW9",
"SNOW10",
};
Script "Rain_Plop_Normal" ENTER
{
int raindrop;
SetHUDSIZE(1600,900,0); //must tweak it in order to get user ingame res
While(TRUE)
{
If(rainswitch==True)
{
If(GetActorPitch(0)<=-0.08)
{
raindrop = random(0,9);
SetFont(rainhit1[raindrop]);
HUDMessage(s:"A"; HUDMSG_FADEOUT|HUDMSG_ALPHA|HUDMSG_ADDBLEND, random(1,500),0,random(-200.0,1600.0), random(-200.0,900.0), 0.02, 1.0, random(0.2, 0.9));
Delay(3);
//Ambientsound("Ambient/RainHit",255);
}
}
Delay(1);
}
}Code: Select all
//first of all, fake actors...
actor GoreClass : Inventory
{
+UNDROPPABLE
+IGNORESKILL
Inventory.Amount 1
Inventory.MaxAmount 3
}
actor HudToken : Inventory
{
+UNDROPPABLE
+IGNORESKILL
Inventory.Amount 1
Inventory.MaxAmount 1
}
actor SpeakToken : Inventory
{
+UNDROPPABLE
+IGNORESKILL
Inventory.Amount 1
Inventory.MaxAmount 1
}
//revamped ral22 amazing rain effects tokens!
actor RainToken : Inventory
{
-INVBAR
+UNDROPPABLE
+IGNORESKILL
Inventory.MaxAmount 1
}
/*actor BloodToken : Inventory
{
+UNDROPPABLE
+IGNORESKILL
Inventory.Amount 1
Inventory.MaxAmount 1
}
actor AcidToken : Inventory
{
+UNDROPPABLE
+IGNORESKILL
Inventory.Amount 1
Inventory.MaxAmount 1
}
actor SnowToken : Inventory
{
+UNDROPPABLE
+IGNORESKILL
Inventory.Amount 1
Inventory.MaxAmount 1
}*/
actor BreathToken : Inventory //this must be useable 4 monsters
{
+NOINTERACTION
+UNDROPPABLE
+NOTELESTOMP
+IGNORESKILL
+NOTELEPORT
+NOBLOCKMAP
+NOTELEFRAG
Inventory.Amount 1
Inventory.MaxAmount 1
Projectile
States
{
Spawn:
TNT1 AA 4 A_SpawnItemEx("ColdBreath", random(1,4), random(6,8), random(32,48), momx, momy, momz, 0, random(128,132))
Stop
}
}
actor ColdBreath //uses hornbeast sprites
{
+NOINTERACTION
+NOTELESTOMP
+WINDTHRUST
+NOTELEPORT
+NOBLOCKMAP
+NOTELEFRAG
+NOCLIP
Projectile
Alpha 0.3
Scale 0.25
RenderStyle Add
States
{
Spawn:
BISH QRSTUVW 8
BISH WWWW 8 A_FadeOut(0.3)
Stop
}
}
//...then classes actors...
ACTOR Skrylax : PlayerPawn
{
Game Doom
Speed 0.90
Health 150
GibHealth 35
Radius 16
Height 56
PainChance 250
Player.DisplayName "Skrylax"
Player.CrouchSprite "PL8C"
Player.StartItem "GoreClass", 1 //-|
Player.StartItem "HudToken", 1 //-|- these uses acs...
Player.StartItem "BreathToken", 0 //-|
Player.StartItem "SpeakToken", 1 //-|
Player.StartItem "RainToken", 1 //-|------------------------- ral22's stuff...
Player.StartItem "FistRedux" //no pistolstart allowed
Player.WeaponSlot 1, Chainsaw, Flashlight, FistRedux
Player.WeaponSlot 2, NewPistol, SilencedPistol
Player.WeaponSlot 3, NewShotgun, NewSuperShotgun, QuadShotgun
Player.WeaponSlot 4, STMinigun, NewChaingun
Player.WeaponSlot 5, STGrenadeLauncher, RocketLauncher
Player.WeaponSlot 6, FreezeRifle, PlasmaRifle
Player.WeaponSlot 7, BFG9000, STBFG10K
Player.WeaponSlot 8, UTNTFlamethrower, UTNTPyroCannon
Player.WeaponSlot 9, CryoBow, Necronomicon
Player.maxhealth 150
BloodColor "Green"
States
{
Spawn:
PLA0 A 4
PLA0 A 0 A_JumpIf(waterlevel<3,2)
PLA0 A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA0 A 4
Loop
See:
PLA0 A 0 A_JumpIf(waterlevel<3,2)
PLA0 A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA0 AB 4
PLA0 C 0 A_JumpIf(waterlevel<3,2)
PLA0 C 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA0 CD 4
Loop
Missile:
PLA0 E 12
Goto Spawn
Melee:
PLA0 F 6 Bright
Goto Missile
Pain:
PLA0 G 0 A_JumpIf(waterlevel<3,2)
PLA0 G 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA0 G 4
PLA0 G 4 A_PlaySound("swpain")
Goto Spawn
Death:
PLA0 H 0 A_JumpIf(waterlevel<3,2)
PLA0 H 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA0 H 10
PLA0 I 10 A_PlayerScream
PLA0 J 10 A_NoBlocking
PLA0 KLM 10
PLA0 N -1
Stop
XDeath: //new
PLA0 O 0 A_SpawnDebris("NashGore_Gib9",0)
PLA0 O 0 A_SpawnDebris("NashGore_Gib10",0)
PLA0 O 0 A_SpawnDebris("NashGore_Gib11",0)
PLA0 O 0 A_SpawnDebris("NashGore_Gib11",0)
PLA0 O 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
PLA0 O 5
PLA0 P 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,2)
PLA0 P 5 A_XScream
PLA0 Q 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,4)
PLA0 Q 5 A_NoBlocking
PLA0 R 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,6)
PLA0 RSTUV 5
PLA0 W -1
Stop
Burn: //new
BURN A 0 A_JumpIf(waterlevel<3,2) //could be useful while underlava ?
BURN A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
BURN A 3 Bright
BURN B 3 Bright A_Scream
BURN C 3 Bright A_Wander
BURN D 3 Bright A_NoBlocking
BURN EFGHIJKLMNOP 5 Bright
BURN Q 3 Bright
BURN RSTU 7 Bright
BURN V 4 A_CustomMissile ("HBeastSmoke",32,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",36,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",40,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",44,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",48,0,0)
BURN V -1
Stop
}
}
ACTOR Kragoth : Skrylax
{
Speed 1
Health 125
GibHealth 35
Radius 16
Height 56
PainChance 253
Player.DisplayName "Kragoth"
Player.CrouchSprite "PL3C"
Player.StartItem "GoreClass", 2
Player.StartItem "HudToken", 1
Player.StartItem "BreathToken", 0
Player.StartItem "SpeakToken", 1
Player.StartItem "RainToken", 1
Player.StartItem "FistRedux"
Player.WeaponSlot 1, Chainsaw, Flashlight, FistRedux
Player.WeaponSlot 2, NewPistol, SilencedPistol
Player.WeaponSlot 3, NewShotgun, NewSuperShotgun, QuadShotgun
Player.WeaponSlot 4, STMinigun, NewChaingun
Player.WeaponSlot 5, STGrenadeLauncher, RocketLauncher
Player.WeaponSlot 6, FreezeRifle, PlasmaRifle
Player.WeaponSlot 7, BFG9000, STBFG10K
Player.WeaponSlot 8, UTNTFlamethrower, UTNTPyroCannon
Player.WeaponSlot 9, CryoBow, Necronomicon
Player.maxhealth 125
BloodColor "Black"
States
{
Spawn:
PLA3 A 4
PLA3 A 0 A_JumpIf(waterlevel<3,2)
PLA3 A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA3 A 4
Loop
See:
PLA3 A 0 A_JumpIf(waterlevel<3,2)
PLA3 A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA3 AB 4
PLA3 C 0 A_JumpIf(waterlevel<3,2)
PLA3 C 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA3 CD 4
Loop
Missile:
PLA3 E 12
Goto Spawn
Melee:
PLA3 F 6 Bright
Goto Missile
Pain:
PLA3 G 0 A_JumpIf(waterlevel<3,2)
PLA3 G 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA3 G 4
PLA3 G 4 A_PlaySound("dkpain")
Goto Spawn
Death:
PLA3 H 0 A_JumpIf(waterlevel<3,2)
PLA0 H 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PLA3 H 10
PLA3 I 10 A_PlayerScream
PLA3 J 10 A_NoBlocking
PLA3 KLM 10
PLA3 N -1
Stop
XDeath: //new
PLA3 O 0 A_SpawnDebris("NashGore_Gib9",0)
PLA3 O 0 A_SpawnDebris("NashGore_Gib10",0)
PLA3 O 0 A_SpawnDebris("NashGore_Gib11",0)
PLA3 O 0 A_SpawnDebris("NashGore_Gib11",0)
PLA3 O 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
PLA3 O 5
PLA3 P 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,2)
PLA3 P 5 A_XScream
PLA3 Q 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,4)
PLA3 Q 5 A_NoBlocking
PLA3 R 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,6)
PLA3 RSTUV 5
PLA3 W -1
Stop
Burn: //new
BURN A 0 A_JumpIf(waterlevel<3,2)
BURN A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
BURN A 3 Bright
BURN B 3 Bright A_Scream
BURN C 3 Bright A_Wander
BURN D 3 Bright A_NoBlocking
BURN EFGHIJKLMNOP 5 Bright
BURN Q 3 Bright
BURN RSTU 7 Bright
BURN V 4 A_CustomMissile ("HBeastSmoke",32,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",36,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",40,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",44,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",48,0,0)
BURN V -1
Stop
}
}
ACTOR Visor : Skrylax
{
Speed 1.10
Health 100
GibHealth 35
Radius 16
Height 56
PainChance 255
Player.DisplayName "Visor"
Player.CrouchSprite "PP2C"
Player.StartItem "GoreClass", 3
Player.StartItem "HudToken", 1
Player.StartItem "BreathToken", 0
Player.StartItem "SpeakToken", 1
Player.StartItem "RainToken", 1
Player.StartItem "FistRedux"
Player.WeaponSlot 1, Chainsaw, Flashlight, FistRedux
Player.WeaponSlot 2, NewPistol, SilencedPistol
Player.WeaponSlot 3, NewShotgun, NewSuperShotgun, QuadShotgun
Player.WeaponSlot 4, STMinigun, NewChaingun
Player.WeaponSlot 5, STGrenadeLauncher, RocketLauncher
Player.WeaponSlot 6, FreezeRifle, PlasmaRifle
Player.WeaponSlot 7, BFG9000, STBFG10K
Player.WeaponSlot 8, UTNTFlamethrower, UTNTPyroCannon
Player.WeaponSlot 9, CryoBow, Necronomicon
Player.maxhealth 100
BloodColor "Red"
States
{
Spawn:
PPS2 A -1
PPS2 A 0 A_JumpIf(waterlevel<3,2)
PPS2 A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PPS2 A 4
Loop
See:
PPS2 A 0 A_JumpIf(waterlevel<3,2)
PPS2 A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PPS2 AB 4
PPS2 C 0 A_JumpIf(waterlevel<3,2)
PPS2 C 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PPS2 CD 4
Loop
Missile:
PPS2 E 12
Goto Spawn
Melee:
PPS2 F 6 Bright
Goto Missile
Pain:
PPS2 G 0 A_JumpIf(waterlevel<3,2)
PPS2 G 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PPS2 G 4
PPS2 G 4 A_PlaySound("blpain")
Goto Spawn
Death:
PPS2 H 0 A_JumpIf(waterlevel<3,2)
PPS2 H 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
PPS2 H 10
PPS2 I 10 A_PlayerScream
PPS2 J 10 A_NoBlocking
PPS2 KLM 10
PPS2 N -1
Stop
XDeath: //new
PPS2 O 0 A_SpawnDebris("NashGore_Gib9",0)
PPS2 O 0 A_SpawnDebris("NashGore_Gib10",0)
PPS2 O 0 A_SpawnDebris("NashGore_Gib11",0)
PPS2 O 0 A_SpawnDebris("NashGore_Gib11",0)
PPS2 O 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
PPS2 O 5
PPS2 P 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,2)
PPS2 P 5 A_XScream
PPS2 Q 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,4)
PPS2 Q 5 A_NoBlocking
PPS2 R 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,6)
PPS2 RSTUV 5
PPS2 W -1
Stop
Burn: //new
BURN A 0 A_JumpIf(waterlevel<3,2)
BURN A 0 A_SpawnItemEx("Bubble",random(4,8),0,random(48,52),0,0,random(1,3),random(0,360),SXF_TRANSFERTRANSLATION,random(4,8))
BURN A 3 Bright
BURN B 3 Bright A_Scream
BURN C 3 Bright A_Wander
BURN D 3 Bright A_NoBlocking
BURN EFGHIJKLMNOP 5 Bright
BURN Q 3 Bright
BURN RSTU 7 Bright
BURN V 4 A_CustomMissile ("HBeastSmoke",32,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",36,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",40,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",44,0,0)
BURN V 4 A_CustomMissile ("HBeastSmoke",48,0,0)
BURN V -1
Stop
}
}
//...then rain actors...
Actor RainSpawner : SwitchableDecoration 10008
{
//$Category Special Effects
//$Sprite RNDRA0
Tag "Rain Spawner"
Game Doom
Radius 1
Height 1
+NOCLIP
+NOGRAVITY
+SPAWNCEILING
+CLIENTSIDEONLY
States
{
Spawn:
Active:
TNT1 A 0 NoDelay A_JumpIf(CallACS("Weather")==0,"Unsighted")
TNT1 A 0 A_CheckSight("Unsighted")
TNT1 A 0 A_JumpIf(Args[2] > 0, "NoSound")
TNT1 A 0 A_JumpIf(Args[3] > 0, "Circle")
TNT1 A 0 A_PlaySoundEx("Ambient/Rain", "SoundSlot7", 1)
TNT1 A 2 A_SpawnItemEx("RainDrop", Random(-Args[0], Args[0]), Random(-Args[0], Args[0]), -2, 0, 0, momz, 0, 128, Args[1])
Loop
Circle:
TNT1 A 2 A_SpawnItemEx("RainDrop", Random(-Args[0], Args[0]), 0, -2, 0, 0, momz, Random(0, 360), 128, Args[1])
NoSound:
TNT1 A 0 A_Jumpif(Args[3] > 0, "NoSoundCircle")
TNT1 A 2 A_SpawnItemEx("RainDrop", Random(-Args[0], Args[0]), Random(-Args[0], Args[0]), -2, 0, 0, momz, 0, 128, Args[1])
Loop
NoSoundCircle:
TNT1 A 2 A_SpawnItemEx("RainDrop", Random(-Args[0], Args[0]), 0, -2, 0, 0, momz, Random(0, 360), 128, Args[1])
Loop
Unsighted:
TNT1 A 1
Goto Spawn
Inactive:
TNT1 A -1
Stop
}
}
Actor RainDrop
{
+MISSILE
-NOGRAVITY
+NOBLOCKMAP
+DONTSPLASH
Height 2
Radius 2
Renderstyle Translucent
Alpha 0.6
Scale 2.1
States
{
Spawn:
RNDR A 1 A_JumpIf(WaterLevel > 0, "Death")
Loop
Death:
RNDR BCDEFGH 3 A_FadeOut(0.15)
Stop
}
}
[EDIT]: ATM I've solved it using acs_execute/terminate inside maps scripts (I'm using hexen's format for now...) + this numbered (not named) library...
Code: Select all
#library "ral22sfx"
#include "zcommon.acs"
bool rainswitch = TRUE;
//normal
str rainhit1[10] =
{
"RAIN1",
"RAIN2",
"RAIN3",
"RAIN4",
"RAIN5",
"RAIN6",
"RAIN7",
"RAIN8",
"RAIN9",
"RAIN10",
};
//bloody
str rainhit2[10] =
{
"RAIN11",
"RAIN12",
"RAIN13",
"RAIN14",
"RAIN15",
"RAIN16",
"RAIN17",
"RAIN18",
"RAIN19",
"RAIN20",
};
//acid
str rainhit3[10] =
{
"RAIN21",
"RAIN22",
"RAIN23",
"RAIN24",
"RAIN25",
"RAIN26",
"RAIN27",
"RAIN28",
"RAIN29",
"RAIN30",
};
//snow
str snowhit[10] =
{
"SNOW1",
"SNOW2",
"SNOW3",
"SNOW4",
"SNOW5",
"SNOW6",
"SNOW7",
"SNOW8",
"SNOW9",
"SNOW10",
};
Script 220 (VOID)
{
int raindrop;
SetHUDSIZE(1600,900,0); //must tweak it in order to get user ingame res
While(TRUE)
{
If(rainswitch==True)
{
If(GetActorPitch(0)<=-0.08)
{
raindrop = random(0,9);
SetFont(rainhit1[raindrop]);
HUDMessage(s:"A"; HUDMSG_FADEOUT|HUDMSG_ALPHA|HUDMSG_ADDBLEND, random(1,500),0,random(-200.0,1600.0), random(-200.0,900.0), 0.02, 1.0, random(0.2, 0.9));
Delay(3);
//Ambientsound("Ambient/RainHit",255);
}
}
Delay(1);
}
}
Last edited by Ozymandias81 on Sat Feb 21, 2015 5:30 am, edited 1 time in total.
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
Thanks a lot for sharing.Ral22 wrote:I will release the script for that elevator since I'm not 100% happy with it. (I wanted it to be a universal script, but it actually has to be specific to each elevator. As long as you're cool with that, you can use it.) Check the main post for the script.
In return, I generalized it.
I couldn't use a fifth argument to let the user specify the smoothing direction so instead I broke this into two functions.
Spoiler:A good example to test this would be something like "pukename floor_smoothendraise TAG 20 50 10"
Now you should be able to reduce the lines you used with the elevators in your video down to 3.
Last edited by Leonard2 on Sat Feb 21, 2015 8:14 am, edited 1 time in total.
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: [Various] Ral22's Proof-of-Concept Corner (Updated: 5/19
Hey, great! I'm not the best with the mathmatical aspect of coding, so I usually end up doing things in the long, drawn out way. I knew there was a way to condense it, I just couldn't figure it out. Good to know you did! I'm gracious that you cleaned it up!Leonard2 wrote:*Awesome stuff*



