Does anyone have any idea as to what the heck is going on he

Post » Sun Aug 09, 2009 3:32 pm

This will NOT work, NO stakes are put in the container!

if OnceADay3 != GetDayOfWeek && target.iscontainer == 1 && target.getitemcount AAVampWoodStake == 0 && target.getitemcount RepairHammer > 0
set ItemNumber to ( ( GetDayOfWeek + 1 ) * 3 )
target.additem AAVampWoodStake ItemNumber
set OnceADay3 to ( GetDayOfWeek )
endif



This WILL work, the wood stakes are indeed put in the container!

if OnceADay3 != GetDayOfWeek && target.iscontainer == 1 && target.getitemcount AAVampWoodStake == 0 && target.getitemcount RepairHammer > 0
set ItemNumber to ( ( GetDayOfWeek + 1 ) * 3 )

messagebox"should work"

target.additem AAVampWoodStake ItemNumber
set OnceADay3 to ( GetDayOfWeek )
endif


All I and say is WTF!!!!???

Does anyone have any idea as to what the heck is going on here?
User avatar
herrade
 
Posts: 3469
Joined: Thu Apr 05, 2007 1:09 pm

Post » Sun Aug 09, 2009 2:15 pm

Something screwing up the byte code format perhaps ? Does rearranging the code work ?
User avatar
Taylrea Teodor
 
Posts: 3378
Joined: Sat Nov 18, 2006 12:20 am

Post » Sun Aug 09, 2009 5:23 am

I suggest using the code that works and put a ; infront of the messagebox.
User avatar
Josh Lozier
 
Posts: 3490
Joined: Tue Nov 27, 2007 5:20 pm

Post » Sun Aug 09, 2009 9:15 am

This will NOT work, NO stakes are put in the container!

if OnceADay3 != GetDayOfWeek && target.iscontainer == 1 && target.getitemcount AAVampWoodStake == 0 && target.getitemcount RepairHammer > 0
set ItemNumber to ( ( GetDayOfWeek + 1 ) * 3 )
target.additem AAVampWoodStake ItemNumber
set OnceADay3 to ( GetDayOfWeek )
endif



This WILL work, the wood stakes are indeed put in the container!

if OnceADay3 != GetDayOfWeek && target.iscontainer == 1 && target.getitemcount AAVampWoodStake == 0 && target.getitemcount RepairHammer > 0
set ItemNumber to ( ( GetDayOfWeek + 1 ) * 3 )

messagebox"should work"

target.additem AAVampWoodStake ItemNumber
set OnceADay3 to ( GetDayOfWeek )
endif


All I and say is WTF!!!!???

Does anyone have any idea as to what the heck is going on here?

Might be the hint of a processing issue. It is trying to run the line target.additem... before it can fully complete setting ItemNumber to a valid amount due to the math functions involved. Adding in the message allows for a small enough pause between the functions for the value to be fully registered and ready to use. It's similar to how you often need more than one command between disabling an object, moving it and then enabling it again.
User avatar
Anthony Santillan
 
Posts: 3461
Joined: Sun Jul 01, 2007 6:42 am

Post » Sun Aug 09, 2009 4:29 am

This one is killing me.

I have tried timers to delay the add item part of the script,
I used disable to make sure the target container was the one I was in front of in the game (for a while I suspect the container was being proxies or switch on me somehow for another container in a hidden location.) I tried putting the wood stakes in the container during the meanie mode when the player opens the container.

Nothing works except playing the messagebox FIRST before attempting to put the items in the box.
Then the items are put in the box right AFTER the messagebox is clicked off and the game mode runs again.

Anyway, I am done with this ridiculous issue, I will put the messagebox in the mod until something reveals itself at a later time.
Can someone please tell me how to AUTO click the box so at least the player will not have to do this.

Edit: SetButtonPressed right, but what flag is used? 0 or 1 ?
Edit2: I got, it is 0.


Might be the hint of a processing issue. It is trying to run the line target.additem... before it can fully complete setting ItemNumber to a valid amount due to the math functions involved. Adding in the message allows for a small enough pause between the functions for the value to be fully registered and ready to use. It's similar to how you often need more than one command between disabling an object, moving it and then enabling it again.

User avatar
Len swann
 
Posts: 3466
Joined: Mon Jun 18, 2007 5:02 pm

Post » Sun Aug 09, 2009 11:24 am

wwwwwwwwwwwwwwwwoooooooooooooo hhhhhhhhhhooooooo!!! :twirl:

some progress!

I change the script to this "just for the heck of it" I am not sure why...

if OnceADay3 != GetDayOfWeek && target.iscontainer == 1 && target.getitemcount AAVampWoodStake == 0 && target.getitemcount RepairHammer > 0
target.additem AAVampWoodStake 3
target.additem aaHolyWaterScroll 1
set OnceADay3 to ( GetDayOfWeek )
endif

Holy water will be placed in the container but not the AAVampWoodStake.

Seems the issue is with the AAVampWoodStake, strange but it is progress, enough to keep me working on the issue...
User avatar
liz barnes
 
Posts: 3387
Joined: Tue Oct 31, 2006 4:10 am

Post » Sun Aug 09, 2009 8:40 am

GOT IT!!!!!

scriptname aadpWoodStakeBroken

;short DeleteMe

begin gamemode

;if DeleteMe == -1
;removeme
;endif

;if GetCurrentHealth <= 0
;set DeleteMe to -1
;return
;endif

end


The wood stakes had this script on it.
commenting the script out (as shown above) solved the issue.

So now I just have to figure out what to do to overcome this at the time the stake need to be put in the container.
I still do not understand exactly WHY. But at the time the stakes are created to then be put in the container the
stake script detects a 0 health on itself then deletes the stake from the contianer...I am gusssing...

I think I can change this so that the container must be an actor before the stake runs the rest of the script.
That should do it!

All I had to do was add:

if Getcontainer == player

That did the trick! :brokencomputer:
User avatar
Trevi
 
Posts: 3404
Joined: Fri Apr 06, 2007 8:26 pm


Return to IV - Oblivion