Aller au contenu

Photo

AI Finesse - I have none - help please!


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Morbane

Morbane
  • Members
  • 1 883 messages
  Well I have a wraith with a sfx on it that makes it look as wide as a hallway and as tall as the ceiling - it is the Juggernaut. I have setup a waypoint circuit for it to follow - relentlessly - not stop to fight - stop for nothing just walk the waypoints for all eternity.

Also as a side question the sfx did not show up in game for the first test - would that be because I deleted the spawn script? All I left were the heartbeat and on blocked everything else was deleted to try to <i>mimic</i>  the AI  I am trying to develop. Problem is I dont know piddly about AI scripting.


ANy help would be awesome.

Another side note _ the Juggernaut will knckdown all in its path and squash them.

#2
kevL

kevL
  • Members
  • 4 078 messages
hey Morbane,

playing with my Dragons i can say a few things ... it sounds like what you want is *not* Ai. Or almost not AI.

By knocking out all the wraith's event scripts you should have it there pretty much; personally I'd start with a clean heartbeat script that simply makes the wraith walkwaypoints() - might want an onspawn script to start that, but maybe not - give it an incorporeal or ethereal effect (permanent) and apply a knockdown effect to any living creatures that get within a meter or so.

The trick is to start clean and put in only what you want to. When you test, notice what's missing and add that in too. This way you'd avoid any hidden calls to DetermineCombatRound() or anything else that might start a default AI script running!

If one tries to start anyway, try an onspawn script that sets the incorporeal effect, the eyes-sef effect (or whatever), the walkwaypoints, and at the bottom of the onspawn try this:

AIAssignDCR(OBJECT_SELF, ""); // #include "ginc_ai"

- that non-string becomes the 'ai' script ... see also 'x2_ai_demo' which could perhaps be used as-is for the AI Override script.

Interesting Possibilities -
effect EffectCutsceneGhost();
effect EffectConcealment(int nPercentage, int nMissType=MISS_CHANCE_TYPE_NORMAL);
effect EffectSpellResistanceIncrease(int nValue, int nUses = -1 );
effect EffectACIncrease(int nValue, int nModifyType=AC_DODGE_BONUS, int nDamageType=AC_VS_DAMAGE_TYPE_ALL, int bVsSpiritsOnly=FALSE);

effect SupernaturalEffect(effect eEffect);


but i'm really not sure what you'll need: I think it's just a cool idea :) oh, give it a Faction like Commoner or a custom ......

ok, i'll shuddup now.

#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Hey morbane.

Re-sizing the wraith may be easier than messing with a sfx.

To make it follow a path, just make a neutral custom faction that is non-hostile to everyone, then use the waypoints system that comes with the toolset to make it follow the path. It will follow the path and ignore everything else.

#4
Morbane

Morbane
  • Members
  • 1 883 messages
kevL
Thanks for your input - that does sound like what I'm really up to. I have a few things to get started on now - this isn't a really major part of my module but having it work proper-like would be nice.

M. Rieder
The VFX makes the wraith a big cube with a texture on it that looks like a huge animal construct - the reason to use the wraith is because it doesnt have a stride to make the vfx wobble as it moved.

In the end tho the players are supposed to have the chance to destroy it if they really want to.

Thanks guys.

 I have decided to delete all the creatures scripts and start from scratch with just the very basic necessities: walk waypoints, be able to crush players, take damage - all while continually moving if possible.

(still accepting suggestions)

Modifié par Morbane, 22 septembre 2011 - 01:03 .


#5
kevL

kevL
  • Members
  • 4 078 messages
it occured to me that it would be hard to keep the Thing updating quickly enough with regular heartbeat script. Consider not using a regular heartbeat and instead place a call to a fake-heartbeat script from onSpawn instead. Like,

//onSpawn
void main()
{
// .. bla blah get stuff ready

ExecuteScript("the_thing", OBJECT_SELF);
}

then,

// the_thing.NSS
//
void main()
{
// object oGoDieMortal = GetNearestEnemy(...);
// -> if (GetDistanceBetween(OBJECT_SELF, oGoDieMortal)) < 1.0f) -> ApplyEffect(oGoDieMortal), effectDamage(...), effectKnockdown(...)


// safety so when something else does
//SetLocalInt(oThing, "StopTheThing", TRUE)
// it stops this madness

if (!GetLocalInt(OBJECT_SELF, "StopTheThing"))
  DelayCommand(1.0f, ExecuteScript("the_thing", OBJECT_SELF));
}


That might keep the Thing trundling through its waypoints without so much as a flinch - tho a judicious application of WalkWayPoints() might well be necessary, Idk.


( Then when PC meets whatever conditions that stop all this, give it a ClearAllActions() & remove whatever invulnerability flags/effects it has, too )

#6
Morbane

Morbane
  • Members
  • 1 883 messages
kevL - thanks again, for the advice and the pseudocode - it will certainly help

#7
kevL

kevL
  • Members
  • 4 078 messages

Morbane wrote...

the pseudocode -

:P

ya, saving energy for Bigby's Dragons o doom ..


gLuck.