reaper9111 Posted May 2, 2009 Share Posted May 2, 2009 Wassup guys, I'm having a huge problem whit my script...here it is !!! I have 2 static objects and 4 creature that i want to be "disable" when Npc "X" is dying !the problem is that when X die is body disapear right away... and both (items and creatures) doesnt "disable"...you need to know that all 4 creature already have a script on them...(to make them what they are) here is a quick version of my script Scn ...blablabla... Begin OnDeath Disable (id of creature 01) Disable (id of creature 02) Disable (id of creature 03) Disable (id of creature 04) Disable (id of object 01) Disable (id of object 02) MessageBox "blablabla..." End now i need to know why is body quicly disapear after he die...why are the objects and creatures do not disapear as i want...what is wrong ??? i mean...it's clear to me that this Should be working... ?I cant remove the script of the creature , or they wont be the same at all... i mean they are what they are becuse of that script...Any who will help solve that will be name in my huge read-me.... (as usual !)Thanks ! Link to comment Share on other sites More sharing options...
LoginToDownload Posted May 3, 2009 Share Posted May 3, 2009 You need to use "ID.disable" instead of "disable ID". I think, with that, it should work. Link to comment Share on other sites More sharing options...
reaper9111 Posted May 3, 2009 Author Share Posted May 3, 2009 You need to use "ID.disable" instead of "disable ID". I think, with that, it should work. No, it's Not Working ! the command need to be place first ! Link to comment Share on other sites More sharing options...
LoginToDownload Posted May 3, 2009 Share Posted May 3, 2009 I'm certain that the syntax is ID.disable. Since that's an object script, it would assume you were talking about the NPC the script was attached to if you did the function first, which would be why the NPC is vanishing so quickly. Are you using the ID of the reference, or the form? Are the references persistent? If you fix that and use the reference IDs, will it let you put their ID first in the disable commands? Link to comment Share on other sites More sharing options...
reaper9111 Posted May 3, 2009 Author Share Posted May 3, 2009 I already make sure they where persitent, and i'm using theyr ID, not the refference IDAnd the npc is not one of the id i want to be "disable" ! Would it work if i try to attach an other script to each of the thing i want disable when he die ?the problem is that i dont know what command to use to do that... or how to start my scrip... maybe something like : it would read when the npc is dead then when it is, it would disable the item/creature that the script is attach to ??? can it be done this way ? and where to start ? what would be the command to be use ?i'm still learning scripting...so... dont be too hard on me ! thanks ! EDIT, maybe something like : Begin "GetDead" getdead (is the NPC ID) Disable "X" End i know that script make no sence... i just want to know if and how something similar can be accomplish ! Link to comment Share on other sites More sharing options...
LoginToDownload Posted May 3, 2009 Share Posted May 3, 2009 I already make sure they where persitent, and i'm using theyr ID, not the refference IDThe Reference ID is the one you're supposed to use. And the npc is not one of the id i want to be "disable" !That's because, since you're giving it the ID second and the command first, it assumes you're not giving it an ID and assumes you're talking about the thing the script is attached to (In this case, the NPC) EDIT, maybe something like : Begin "GetDead" getdead (is the NPC ID)Disable "X" EndThat wouldn't work because, just like the problem with this script, you're giving the function before the ID. So it would once again assume you're asking whether the thing the script is attached to is dead and, if so, it would disable itself. If you want something to disable on its own death, that would work well. If you changed it to if (NPC).GetDead, it would work fine. If you're not talking about whatever the script is attached to, you need to give it the reference you're talking about before the function, then a dot, and then the function itself. For example, the command Kill player would kill whatever the script was attached to (And wouldn't work on a Quest) and assume the player was the culprit. If the command was player.kill, the player would die. Link to comment Share on other sites More sharing options...
reaper9111 Posted May 3, 2009 Author Share Posted May 3, 2009 That is what i'm talking about... If... getdead...Ok ! and thanks for pointing me the right Id to use ...and all the other precious info... You guys here on nexus are awesome...(Trolls Not Include)...lol Many thanks ! Link to comment Share on other sites More sharing options...
LoginToDownload Posted May 3, 2009 Share Posted May 3, 2009 No problem. Best of luck with your project. Link to comment Share on other sites More sharing options...
Ranokoa Posted May 3, 2009 Share Posted May 3, 2009 You know i believe you can add more than one script function per script. Like, after you end your script that is on the creatures for whatever it is, just do another IF getdead thing. I hope you understand what i meen, basically in one script it can carry out more than one function with multiple variables. The project im currently working on does the same thing, it will not allow a player to leave if certain things happen, and it will also have an invasion attatched to it. Basically, two completely seperate functions, one script, a bunch of variables. Link to comment Share on other sites More sharing options...
reaper9111 Posted May 3, 2009 Author Share Posted May 3, 2009 yeah, i know that script can be extremly long and complexe...whit a lot more command, fonction and variable... thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.