Page 2 of 2

Posted: Mon Oct 24, 2005 1:12
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.

Posted: Mon Oct 24, 2005 1:23
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.

Posted: Mon Oct 24, 2005 10:25
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.

Posted: Mon Oct 24, 2005 11:43
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]

Posted: Mon Oct 24, 2005 11:58
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.

Posted: Mon Oct 24, 2005 18:31
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.

Posted: Mon Oct 24, 2005 22:43
by TheDarkArchon
Graf Zahl wrote:The script...doesn't handle respawning properly.
How so? It appears to be alright to me.

Posted: Mon Oct 24, 2005 22:45
by Graf Zahl
It isn't restarted when a player respawns in multiplayer. It just runs once at the start of the map.

Posted: Mon Oct 24, 2005 23:33
by TheDarkArchon
Oh. I thought the script ran continously.