NPC-Script

Topics regarding Scripting with Reality Factory
Post Reply
tOy)styLe(
Posts: 6
Joined: Thu Aug 25, 2005 4:01 pm

NPC-Script

Post by tOy)styLe( » Thu Aug 25, 2005 4:10 pm

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!

Ransom

Post by Ransom » Fri Aug 26, 2005 12:20 am

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

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Fri Aug 26, 2005 12:30 am

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

tOy)styLe(
Posts: 6
Joined: Thu Aug 25, 2005 4:01 pm

Post by tOy)styLe( » Fri Aug 26, 2005 10:27 am

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!

Ransom

Post by Ransom » Fri Aug 26, 2005 1:04 pm

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.

tOy)styLe(
Posts: 6
Joined: Thu Aug 25, 2005 4:01 pm

Post by tOy)styLe( » Fri Aug 26, 2005 4:39 pm

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

Ransom

Post by Ransom » Fri Aug 26, 2005 5:04 pm

Why don't you post the script so we can see it?

Post Reply