changing your starting weapon with DECORATE

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Soultaker wrote:The following is how I have it set for my mod. Note though the game reverts to the starter weapon every time a new map is loaded. I find it to be highly annoying.
That's what the quest item is preventing. Once it is put in the inventory it stays until the player dies so the script isn't executed on later maps.
User avatar
Soultaker
Posts: 219
Joined: Fri Sep 02, 2005 8:26
Location: Capping some zombies Gangsta Style.
Contact:

Post by Soultaker »

Well I have it set as such because I like trying to reduce the number of errors that come up. Bad enough Decorate bitches about items being replaced. All well at least in the future when Decorate supports starter weapon replacements in a more saner and rational manner then we won't have to resort to using wonky scripting techniques.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

You set it up in a way that doesn't work.

1. You have to give the item you are checking for to the player. Otherwise the next check is guaranteed to fail. That's error #1
2. Is "st-dlss" a DECORATE inventory item? If no, that's error #2

I used QuestItem1 because it is already defined, does exactly what is needed and isn't used outside of Strife.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

It doesn't revert to the starter weapon the way I have mine set up. I assume thats because the script which Graf posted, and which I basically copied, gives an item (QuestItem1) and the script checks for that at the start of each level. I do nothing to remove the item, so when the inventory is checked at the start of the next level, the item is present so the weapons are not altered.

With your script, you are checking for an item called st-dlss but I see nothing to give that item to the inventory - so I assume at the start of the next level, the inventory is checked, the st-dlss item is not present and the stuff in the "if" braces gets reactivated.

[edit]beaten by Graf ;)[/edit]


@Graf: When you say "It doesn't work for multiplayer though" how do you mean? Do you mean the script simply isn't executed or that it messes up some other way? Simply not being executed in MP fits my needs perfectly BTW.

[edit2]BTW, here's a reference for FS editing I found. If someone knows of something better, please share.
http://legacy.newdoom.com/der/scripts/legacy.shtml
[/edit2]
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

The script only runs for player 0 and doesn't handle respawning properly. Running it for all players is not a big issue, just iterate though all players and pass the number as the first parameter but respawning is an issue unless you continuously loop the script.
User avatar
Soultaker
Posts: 219
Joined: Fri Sep 02, 2005 8:26
Location: Capping some zombies Gangsta Style.
Contact:

Post by Soultaker »

That is a reference to the name of my mod's wad name. I thought it was like the KeyConf lump file. Heh. Well I am not worried. The mod will take sometime to work on so hopefuly once I get near a release the starter weapon system will be reworked for Decorate usage.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

Graf Zahl wrote:The script...doesn't handle respawning properly.
How so? It appears to be alright to me.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

It isn't restarted when a player respawns in multiplayer. It just runs once at the start of the map.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

Oh. I thought the script ran continously.
Locked

Return to “GZDoom”