Page 1 of 1

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

PostPosted: Sun Aug 09, 2009 3:32 pm
by herrade
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?

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

PostPosted: Sun Aug 09, 2009 2:15 pm
by Taylrea Teodor
Something screwing up the byte code format perhaps ? Does rearranging the code work ?

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

PostPosted: Sun Aug 09, 2009 5:23 am
by Josh Lozier
I suggest using the code that works and put a ; infront of the messagebox.

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

PostPosted: Sun Aug 09, 2009 9:15 am
by Anthony Santillan
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.

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

PostPosted: Sun Aug 09, 2009 4:29 am
by Len swann
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.


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

PostPosted: Sun Aug 09, 2009 11:24 am
by liz barnes
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...

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

PostPosted: Sun Aug 09, 2009 8:40 am
by Trevi
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: