The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1 | 2 | (show all)
Archived User Account

Boots of Rising Frustration
      #2923313 - 08/13/04 03:37 AM

No, not a new enchantment

I'm having a little difficulty getting these boots to work exactly as intended. The idea is that when the player equips the boots they get a massive burden (which works fine) and when they take off the boots the burden goes away (works fine).

However, when the boots are equipped they are also supposed to make a monster appear behind the player........this part isnt working.

Any ideas?

Code:
 begin PB_Paralyse_boots

short OnPCEquip
short OnPC
short monster

if ( OnPCEquip == 1 )
set OnPC to 1
Player->AddSpell "_pb_ftm_sp_boots"
if ( monster == 0 )
PlaceatPC "in_dae_all_lev+2" 1, 250, 1
Set Monster to 1
endif
endif

if ( OnPC == 1 )
if ( OnPCEquip == 0 )
set OnPC to 0
Player->RemoveSpell "_pb_ftm_sp_boots"
Set Monster to 0
endif
endif

end



Post Extras: Print Post   Remind Me!   Notify Moderator  
WhoopA
Acolyte

Reged: 01/22/04
Posts: 108
Loc: Domino City
Re: Boots of Rising Frustration [Re: ]
      #2923397 - 08/13/04 04:25 AM

I THINK - emphasis on the THINK - that you can't summon a monster from a levelled list. I could be wrong though so don't quote me.

--------------------
--- WhoopA, the Official Kicker of Asses

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Boots of Rising Frustration [Re: WhoopA]
      #2923503 - 08/13/04 05:26 AM

Quote:

I THINK - emphasis on the THINK - that you can't summon a monster from a levelled list. I could be wrong though so don't quote me.




Thats a pain if true

I'll try it with a custom creature......maybe script a levelled beast

if (GetPCLevel < 10 )
Place Level 20 creature
elseif ( GetPCLevel > 10 )
if ( (GetPCLevel < 20 )
Place Level 30 creature
etc etc etc

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Boots of Rising Frustration [Re: ]
      #2924121 - 08/13/04 10:02 AM

Also, you may want to test your "monster" variable for a NOT == 1 condition. Initializing the variable at the beginning of the script does not necessarily set it to 0.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Klinn
Diviner

Reged: 11/19/02
Posts: 2319
Re: Boots of Rising Frustration [Re: ]
      #2924288 - 08/13/04 11:03 AM

Patrograd: Whoa! You're coming up with some devilish traps! It looks like WhoopA is right - I just tried it with a levelled creature and it didn't work. Substituted a regular critter and it worked fine. I looked at about half the existing scripts in the game that use the PlaceAtPC function, and none of them use a levelled creature. Out of curiousity I also tried it with the 'PlaceAtMe' function, with the same results. Oh well.

HeyYou: I assume you meant "Declaring the variable", not "Initializing the variable", but anyway when a local variable declared in a script it is automatically initialized to zero. That probably happens when the game engine allocates space for the variable and, yes, technically I don't know for sure if that occurs when the script interpreter first encounters the declaration, or when the variable is actually used for the first time, but the end result is the same: you can count on a local variable being zero initially.

...Klinn


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Boots of Rising Frustration [Re: Klinn]
      #2924412 - 08/13/04 11:41 AM

Quote:

Patrograd: Whoa! You're coming up with some devilish traps!




Yeah, it works if I substitute Golden Saint instead. Hmm, here's a thought. it'd be nice if the player had to fight the golden saint with the boots on....

If it took, say, on average, 20 seconds to dispose of a Golden Saint....

HOw would I alter that script so that the player couldnt unequip for 20 seconds?

Post Extras: Print Post   Remind Me!   Notify Moderator  
Klinn
Diviner

Reged: 11/19/02
Posts: 2319
Re: Boots of Rising Frustration [Re: ]
      #2924488 - 08/13/04 11:59 AM

Put in a timer that controls re-equipping of the boots if the player removes them, e.g.
Code:
Begin PB_Paralyse_boots


Short OnPCEquip
Short OnPC
Short Monster
Float Timer

If ( OnPCEquip == 1 )
Set OnPC To 1
;Player->AddSpell "_pb_ftm_sp_boots"
If ( Monster == 0 )
MessageBox "Got to placing monster bit."
;PlaceatPC "in_dae_all_lev+2", 1, 250, 1
PlaceatPC "golden saint", 1, 250, 1
Set Monster To 1
EndIf
EndIf

If ( OnPC == 1 )
Set Timer To ( Timer + GetSecondsPassed)
If ( OnPCEquip == 0 )
If ( Timer < 20 )
MessageBox "Can't take 'em off yet!"
Player -> Equip "PB_Boots"
Else
Set OnPC To 0
;Player->RemoveSpell "_pb_ftm_sp_boots"
Set Monster To 0
Set Timer To 0
EndIf
EndIf
EndIf

End


To avoid embarassment, I even tested this code! Seems to work OK.

Edit: But maybe it would more interesting if, instead of a specific time limit, one couldn't remove them until the critter is killed. I'll try to whip up a variation allowing this.

...Klinn


Edited by Klinn (08/13/04 12:12 PM)

Post Extras: Print Post   Remind Me!   Notify Moderator  
Klinn
Diviner

Reged: 11/19/02
Posts: 2319
Re: Boots of Rising Frustration [Re: Klinn]
      #2924591 - 08/13/04 12:30 PM

OK, this variation prevents the player from removing the boots (actually, it re-equips them) until she has killed the creature. Code:
Begin PB_Paralyse_boots

Short OnPCEquip
Short OnPC
Short Monster
Short CritterCount

If ( OnPCEquip == 1 )
Set OnPC To 1
;Player->AddSpell "_pb_ftm_sp_boots"
If ( Monster == 0 )
;MessageBox "Got to placing monster bit."
;PlaceAtPC "in_dae_all_lev+2", 1, 250, 1
PlaceAtPC "golden saint", 1, 250, 1
Set Monster To 1
Set CritterCount To (GetDeadCount "golden saint")
EndIf
EndIf

If ( OnPC == 1 )
If ( OnPCEquip == 0 )
If ( GetDeadCount "golden saint" == CritterCount )
MessageBox "Can't take 'em off yet!"
Player -> Equip "PB_Boots"
Else
Set OnPC To 0
;Player->RemoveSpell "_pb_ftm_sp_boots"
Set Monster To 0
EndIf
EndIf
EndIf

End


Just be careful to use exactly the same creature ID in the GetDeadCount statements as appears in the PlaceAtPC line. In my testing, one time there was a bit of lag between when the golden saint was killed and when I could remove the boots - half a second or so. Other tests were fine. This script also will work repeatedly, i.e. if the player defeats one critter, takes off the boots, doesn't learn his lesson and puts them back on again, another critter attacks. If you wanted to avoid that behaviour, you could use a DoOnce-type flag which skips out early if set.

Hope this helps,

...Klinn


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Boots of Rising Frustration [Re: Klinn]
      #2925260 - 08/13/04 03:25 PM

Thanks Klinn

How does it know which golden saint to pick on? I mean, lets say I killed a Golden Saint yesterday, wont that getDeadCount return true?

SHould I make it a unique Golden saint and assume the player will only do it once? Thats why I thought of the timer

Post Extras: Print Post   Remind Me!   Notify Moderator  
Klinn
Diviner

Reged: 11/19/02
Posts: 2319
Re: Boots of Rising Frustration [Re: ]
      #2925428 - 08/13/04 04:16 PM

The GetDeadCount function returns the quantity of that creature/NPC killed by the player over the whole course of the game, not just a True/False flag.

So by saving the previous quantity when spawning the critter, we can then check if it has been increased. (or in my code, not equal to the previous saved quantity) If they have killed 20 Golden Saints before stumbling into your trap, 'CritterCount' will be 20. Once the spawned G.S. is off'ed, GetDeadCount "golden saint" will return 21.

In theory, if the player could somehow go off and kill a different Golden Saint instead of the one that was spawned, that would also increase the quantity returned by GetDeadCount. But he ain't goin' anywhere with that burden spell on him!

I set it up as shown so you could use any creature, you wouldn't have to worry about creating a new unique-ID one. So long as the ID codes match as I mentioned above, you'll be fine. You could also spawn multiple creatures of the same type around the player, maybe more if the player is of a higher level, and check to see if GetDeadCount returns CritterCount + the number spawned. So the player would have to kill, say, all three before being able to take off the boots. "Rising Frustration" indeed!

...Klinn


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Boots of Rising Frustration [Re: Klinn]
      #2925534 - 08/13/04 04:44 PM

Thanks Klinn

Must be Friday night, I didnt see that line of code....very clever as always

I like it....hehe that'll teach'em to wander into my dungeon thinking they can just pick up any old thing.

I've a great 'holy grail' type 'trap' too using OnPCEquip (great for hiding enchantments this command). Nice Golden helm, with apparently mega uber kill-all enchantment and massive value, that when equipped has a nasty side effect that will soon dispose of those uber item hunters . Next to it on the table a plain iron helm, value 5GP, no enchantment, but with a nice effect added by OnPCEquip....I'm too nasty really

Thanks again

Post Extras: Print Post   Remind Me!   Notify Moderator  
Silver_Falcon
Adept

Reged: 03/13/04
Posts: 395
Loc: Here
Re: Boots of Rising Frustration [Re: ]
      #2925749 - 08/13/04 05:47 PM

I havent had time to read this thouroughly, but it seems to me that you could substitute in the random function instead of a leveled list for the same effect

--------------------
My Icon Tutorial

Post Extras: Print Post   Remind Me!   Notify Moderator  
cyran0
Initiate

Reged: 06/04/04
Posts: 58
Re: Boots of Rising Frustration [Re: Klinn]
      #2925832 - 08/13/04 06:15 PM

Klinn, another way to approach this could be to check for the battle music with GetSoundPlaying. This way, no reference to the type of creature (or numbers of them), need be scripted. The liability (or benefit) is that this same problem will be encountered by the player anytime he's wearing the boots at the onset of combat. It is a bit unrealistic that the player should be able to change his entire wardrobe during a battle. Perhaps someone should write a mod to make all armor non-equipable during combat.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Klinn
Diviner

Reged: 11/19/02
Posts: 2319
Re: Boots of Rising Frustration [Re: cyran0]
      #2928221 - 08/14/04 10:37 AM

That's an interesting idea, Cyran0! The boots would become more like a cursed item that burdens the player during any combat, not just a specific trap.

Sorry Patrograd, I hope you don't mind us re-writing your mod-in-progress on the fly.

...Klinn


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mode_Locrian
Diviner

Reged: 10/07/02
Posts: 2084
Loc: Bjornholm, Rykith Lowlands Region
Re: Boots of Rising Frustration [Re: cyran0]
      #2928263 - 08/14/04 10:53 AM

Quote:

Klinn, another way to approach this could be to check for the battle music with GetSoundPlaying.




Sadly, this is impossible. GetSoundPlaying only checks for sounds playing (that is, objects of type "sound") whereas the music is of type "music."

You could check to see if they player was attacking with a weapon, or casting a spell, or being hit, but I think that's about it.

--------------------
My Website
Bards of Vvardenfell Thread (New Info 8/15/04)


Post Extras: Print Post   Remind Me!   Notify Moderator  
ManaUser
Master

Reged: 05/31/00
Posts: 6115
Loc: Long Beach, CA, USA
Re: Boots of Rising Frustration [Re: cyran0]
      #2928265 - 08/14/04 10:54 AM

Battle music isn't a "sound", so I don't think that will work.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1 | 2 | (show all)


Extra information
0 registered and 4 anonymous users are browsing this forum.

Moderator:  Umrahel, Freddo, Pete, Hungry Donner, Attrebus, Miltiades, tegger 

Print Thread

Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 167

Rate this thread
 
Jump to

The Elder Scrolls Homepage

*
UBB.threads™ 6.3

Click for Privacy Statement 2003 Bethesda Softworks LLC, a ZeniMax Media company. All Rights Reserved.
PRIVACY POLICY | TERMS & CONDITIONS | LEGAL INFORMATION | CONTACT US