|
Oblivion Kaos
0z0ne Bringer
Join date: 28 Sep 2005
Posts: 17
|
10-12-2005 11:21
Hello all, Scenario: I have a container object A, that when touched gives an object B. This object B have a script that says Hello when touched. My problem: I touch the object container A and it works, it gives me the object B. But when a rez the object B from my inventory, the script does not work (yes, it works but when I am the one touching, but with other avatars it does not work). I think it is a problem with Owner permissions but not sure what to do next... Object A script: default { touch_start ( integer total){ llGiveInventory(llDetectedKey(0),"Object B"  ; } } Object B: default { state_entry(){ } touch_start(integer total){ llSay(0,"Hello"  ; } }
|
|
Ginge Reymont
Registered User
Join date: 10 Oct 2005
Posts: 190
|
10-12-2005 14:01
You need to put a reset script in there , make sure it reset ever rez so state_entry llResetScript();
I would say
|
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-12-2005 14:35
Rezzing does not call the state_entry() event, only a reset of the script does (as in ginge's code). Instead rezzing the object calls the on_rez(integer parameter) event, so you should put the "Hello" there.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
|
Digi Vox
Registered User
Join date: 10 Apr 2005
Posts: 25
|
10-12-2005 15:33
You shouldn't need to use llReset() for this script b/ there's no state information or variables that would change. I tried those two scripts just as you have shown and they worked fine. I have 1 plywood cube as Object A. It gives plywood cube Object B with permissions no copy/no mod/no trans to people other than me. I had me and another guy each touch Object A and we both put out our Object Bs. Both Bs said Hello anytime anyone touched them. Are these the exact and only scripts that you're using right now?
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
10-12-2005 16:12
I've seen weirdness with touch events if a script gets reset. Try building fresh objects and dropping these scripts into them. Or set scripts to not running, followed by running, and then update object B back into object A's inventory.
|