Page 1 of 1

NPC-Script

Posted: Thu Aug 25, 2005 4:10 pm
by tOy)styLe(
Hey everyone out there,

Is with RF a possibility to make a friendly npc (hostileplayer=friendly) change his attitude to the player within gaming?! I mean if theres a conversation between player and a friendly non-player-character and the player says within the convo "get rid off me" so that the npc will got angry and slaps against the player?!

I have no idea how to get on that script, so i hope that there is someone kindly enough to help me. And i know that theres a lot of kindly people out there :D!

Thx in advance!
Cheers!

Posted: Fri Aug 26, 2005 12:20 am
by Ransom
Yes, its entirely possible. Basically what you're looking for is a simple IF, THEN statement. Check out the docs http://dhost.info/realityfactory/docs.htm

Posted: Fri Aug 26, 2005 12:30 am
by rgdyman
HostilePlayer(bool State ); // true or false.

You can change this at anytime.

I did this with a pushable abject in the past.


IsPushable(bool Flag ); // true or false

Posted: Fri Aug 26, 2005 10:27 am
by tOy)styLe(
First, i would thank you for your fast replys :)!

Then i would to ask if you could be so kindly and give me an example code of the whole hostileplayer thing? :)

Thx in advance!

Posted: Fri Aug 26, 2005 1:04 pm
by Ransom
Look in your RF directory for a folder called Script, and a subfolder called Sample. There are several scripts in there. genericmonster uses the command you're asking about.

Posted: Fri Aug 26, 2005 4:39 pm
by tOy)styLe(
thx for reply ransom,

the thing is, that i tried several things to change in the sample scripts with hostileplayer and i also looked in docs to solve this problem. But without a reason...

It still dont work... I have set hostileplayer at the beginning of the script to friendly ... i have set the hostileplayer-part in an enhanced codesnippet to a point so that the npc only slaps to a player, when he has a special thing in his inventory...But everything i try to make this thing work - i get pissed off :D.

Hope there are still people out there with a solution :). Thx in Advance

Posted: Fri Aug 26, 2005 5:04 pm
by Ransom
Why don't you post the script so we can see it?