stars2heaven Posted December 17, 2009 Share Posted December 17, 2009 Im trying to get a creature to attack you when you attempt to loot it. Once you kill it, then you can loot it. My script works just fine for that. But it's having an odd side effect. Event though I start combat, the creature wont chase me or hit me if Im close. Since it will do those things without the script, Im guessing Im doing something wrong. Here is what Ive got. Scn DI3ShuuResurectionScript Short DoOnce Begin OnActivate If DoOnce == 0 SetAV health 15 Resurrect 1 StartCombat player Set DoOnce to 1 Else If DoOnce == 1 Activate EndIf EndIf End Why is this causing the creature to just stand there during combat? Link to comment Share on other sites More sharing options...
Vagrant0 Posted December 17, 2009 Share Posted December 17, 2009 Im trying to get a creature to attack you when you attempt to loot it. Once you kill it, then you can loot it. My script works just fine for that. But it's having an odd side effect. Event though I start combat, the creature wont chase me or hit me if Im close. Since it will do those things without the script, Im guessing Im doing something wrong. Here is what Ive got. Why is this causing the creature to just stand there during combat?Try this... Scn DI3ShuuResurectionScript Short DoOnce Begin OnActivate If DoOnce == 0 [b]&& getdead == 1 [/b] [b] Resurrect 1 SetAV health 15[/b] StartCombat player Set DoOnce to 1 Else[b]if getdead == 1 [/b] If DoOnce == 1 Activate EndIf EndIf EndChanges in bold Alternatively... Scn DI3ShuuResurectionScript Short DoOnce Begin ondeath if DoOnce == 0 Set DoOnce to 1 elseif DoOnce == 2 Set DoOnce to 3 endif end Begin OnActivate if getdead == 1 If DoOnce == 1 Resurrect 1 SetAV health 15 StartCombat player Set DoOnce to 2 Return elseIf DoOnce == 3 Activate else return EndIf EndIf EndMight be a better option since it will only trigger the doonce change upon death, but still revives the creature if it is activated once killed. Link to comment Share on other sites More sharing options...
stars2heaven Posted December 17, 2009 Author Share Posted December 17, 2009 For some reason your first script prevents the resurection completely. I tried altering it a few different ways but nothing made it work. The second wont work for my purposes since it requires that the creature be alive to begin with. Could that be the issue? I want the player to find this creature dead, be enticed to try to loot it since there is both some back story and it is named, and then find out that the creature is now undead. If it is the issue, maybe there is some other way of doing the same thing. I also tried a similar script with most everything but one line in a GameMode block. It did the same thing as my original, but with the same consequences. Link to comment Share on other sites More sharing options...
Vagrant0 Posted December 17, 2009 Share Posted December 17, 2009 If it is the issue, maybe there is some other way of doing the same thing.The way to do something like this depends mostly on where this creature is used. What you might want to try is simply using either a kill function, or a set DoOnce to 1 within an onload block. The problem however is that a creature which starts out with 0 health when being placed will often have bugged health upon resurrect. Using a fatigue ability which is removed upon activate is a possible alternative to the actor being dead, but the option to loot looks different. Link to comment Share on other sites More sharing options...
stars2heaven Posted December 17, 2009 Author Share Posted December 17, 2009 Thanks alot, the kill function did the trick! It now works exactly as I wanted. Only unfortunate side effect now is that I cant position him exactly as I wanted :( I liked being able to position him in such a way that made it look like he was running from something when he died. Oh well, not much is lost in that aspect. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts