Jump to content


Photo

Scripting Help


  • Please log in to reply
3 replies to this topic

#1 crazyhybrid9999

crazyhybrid9999

    "Some call me the Space Cowboy..."

  • Member
  • 112 posts

Posted 17 July 2004 - 07:29 PM

I'm making a NPC and I wish for him to go hostile when certain Dialouge options are chosen.

Ex:
IF ~~ THEN REPLY ~Ha ha ha ha ha~ Vlar! What a stupid name! Ha ha ha ha. Welcome aboard. We could use the comic releif.~ GOTO Enraged

IF ~~ THEN BEGIN Enraged
SAY ~You stupid little bastard. Insult me will you. I'm going to gut you like the pig that you are.~

Yeah so after the Enraged Dialouge i want my NPC Vlar to go hostile to my PC and party.

#2 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 17 July 2004 - 09:16 PM

IF ~~ THEN BEGIN Enraged

SAY ~You stupid little bastard. Insult me will you. I'm going to gut you like the pig that you are.~

  IF ~~ THEN DO ~Enemy()~ EXIT

END

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#3 crazyhybrid9999

crazyhybrid9999

    "Some call me the Space Cowboy..."

  • Member
  • 112 posts

Posted 17 July 2004 - 10:47 PM

Your my hero. Thanks man.

#4 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 18 July 2004 - 05:12 AM

I'd also add:

IF ~~ THEN BEGIN Enraged
SAY ~You stupid little bastard. Insult me will you. I'm going to gut you like the pig that you are.~
IF ~~ THEN DO ~Enemy() Attack(NearestEnemyOf(Myself)) ~ EXIT
END

in the code. It's not necessary, but the NPC can refuse to attack, even if you used Enemy(). It depends on the scripting. If your script for the NPC includes attacking if he sees an enemy, it's not necessary.

Also, you might want to change the:

~Ha ha ha ha ha~ Vlar! What a stupid name! Ha ha ha ha. Welcome aboard. We could use the comic releif.~

You've got three tildes. WeiDU won't like that. Instead, do this (or something...):
~*Ha ha ha ha ha* Vlar! What a stupid name! Ha ha ha ha. Welcome aboard. We could use the comic releif.~

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner