r3784 - FS viewheight change problem

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Enjay
 
 
Posts: 27251
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

r3784 - FS viewheight change problem

Post by Enjay »

OK, I'm trying to muddle my way through some FraggleScript stuff and I have come up with something that I think is a bug. The following is intended to go into a FSGLOBAL lump. It runs script 254 which, thereafter, keeps running itself. If the player is given QuestItem1, the view is supposed to shift down and if QuestItem1 is taken away, the view is supposed to shift back to where it was (the default of 41).

Now, I can accept that the script is probably messy and I would welcome any suggestions to improve it. However, the bug isn't with the script per se, it is to do with the height changing function.

Save the following script to a FSGLOBAL lump and load it. Start a game and, at the console, type "give QuestItem1". When you do this, the player's viewheight drops to 25. So far so good.

Now type "take QuestItem1" at the console and the view height does not change. However, the command has been run because as soon as you go up a step, the viewheight alters to the required 41.

So, short version, if a FraggleScript is changing the viewheight from 25 to 41, the change will not take effect until the player walks up a step. Presumably it *should* take effect immediately the command is run?

Code: Select all

[scripts] 

//include("lspec.h");

script 254 
{ 
   
   if (checkinventory(0, "QuestItem1",1)) 
   { 
	 runcommand("viewheight 25");
   }
   
   wait(35);
   
   if (!checkinventory(0, "QuestItem1",1)) 
   { 
	 runcommand("viewheight 41");
   }
   
   wait(35); 
   startscript(254); 
} 

startscript(254); 
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: r3784 - FS viewheight change problem

Post by Graf Zahl »

This is a hack feature, just for LEgacy compatibility.

There should probably be a proper way to do this.

This won't get changed, though.
Post Reply

Return to “Closed Bugs [GZDoom]”