Jump to content

My script isn't working


Guest Guest_hotspot

Recommended Posts

Guest Guest_hotspot

The player is suppose to kill an orc as a woman is on the ground. When orc is dead, she stands up. I was given this script, but apparently she's stands up, then falls down for some reason. I wait for some hours, she gets up and falls down again. Please tell me how to fix this with this script, or one you feel may work. Thanks.

 

~ hotspot

 

Orc has this script on him. V_weak_woman is the woman lying on the ground.

 

-------

script:

 

Begin dyin_orc

if ( onDeath == 0 )

v_weak_woman -> setFatigue -30

else

v_weak_woman -> setFatigue 175

endif

End Script dyin_orc

 

--------

Link to comment
Share on other sites

Just a thought (but I'm not good at script, so use at own disgression), but the orc is probably standing up, then immediately dying again... so try scripting in some health points for her when she stands up.

 

Or, if you want her to be dead, but still standing ( :blink: uhh... yeah), there is a script function or something I think that makes it so that the NPC will not move, but stay motionless, standing up... I read it somewhere for when making manequins.

Link to comment
Share on other sites

Hey, I got it to work a few days ago. Thanks though :)

 

Another problem,

 

Husband says 'thank you' after you return her wife. I want him to say 'thank you' in force greeting. Now do I put this script in the result box or a script in himself, and how would he know what message to use?

 

short done

 

if done == 0

if ( GetDistance,v_weak_woman < 100 ) ;when the NPC is close enough...

ForceGreeting; he greets you

set done to 1; once is enough!

endIfendIf

Link to comment
Share on other sites

You can't put a script into the results box - the results box will only accept one-liner script commands but no if/endif statements

 

To make sure you get the correct greeting you need to set a flag - for instance, add a journalentry to the first script - eg:

 

Journal RescuedWife 10

 

 

 

Then use this flag for the greeting you want the husband to use - you can also use this flag in the script for the husband to make sure you don't get the forcegreeting all the time, eg

 

if ( GetJournalIndex RescuedWife == 10)

ForceGreeting etc etc

endif

 

 

In the results box for the greeting, you can then add another journalentry so you don't get the forcegreeting every time you talk to the husband after the rescue.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...