Weapon Recoil

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
SergeantGnarKill
Posts: 83
Joined: Sat Dec 19, 2009 1:17 am
Location: In front of my computer

Weapon Recoil

Post by SergeantGnarKill »

Does anybody know of a way to create a recoil effect similar to the one in Hideous destructor, but in DECORATE? What would that look like? In ACS, it looks like:

Code: Select all

script 999 (int climb, int twist)
{ 
	int playerpitch = GetActorPitch(0) - ((random(1,3)+5)*climb);
	if (playerpitch > -5780)
		{
		SetActorPitch (0, playerpitch);
		}
	int playerangle = GetActorAngle(0) - ((random(1,2)+4)*twist);
	SetActorAngle (0, playerangle);
}
but I want it in DECORATE, is this possible?
CaptainToenail
Posts: 3975
Joined: Fri Jul 06, 2007 9:16 am

Re: Weapon Recoil

Post by CaptainToenail »

Yeah, just use A_SetPitch

e.g. A_SetPitch (pitch-1) or A_SetPitch (pitch+3.5)

It's a cool function, just don't go OTT :lol:
Locked

Return to “Editing (Archive)”