Jump to content

NPCs using Mind Trick


Recommended Posts

Posted

Any idea how to make npcs use mind trick against you and vice-versa? In this case if a force user mind tricks you, he/she will become invisible to you, and if you mind trick a force user you'll be invisible to them (like in mp), then you'd have to use force sight (you'd also have to have force sense more powerful than the enemy's mind trick) to be able to see them

 

This doable?

Posted

I'm not sure if it's doable, as I'm not a coder, but it sure does sound like a great concept!  :winkthumb:

I'd imagine this would be possible, as they made it possible in MP.

Posted

It is - Just look for the disruptor rifle's disintegration & the shadowtrooper's cloak, make some edits in Jedi_AI, and you should be good to go. (You'd also have to edit ForceTelepathy as well.)

Posted

It is - Just look for the disruptor rifle's disintegration & the shadowtrooper's cloak, make some edits in Jedi_AI, and you should be good to go. (You'd also have to edit ForceTelepathy as well.)

That's just the problem, i have no idea as to how to go around editing force telepathy since I can't just copypaste code from mp, all coding tutorials about editing FPs don't mention specificaly how to achieve "this" or "that" effect, they just give you some general info as to how to set up stuff and the where to edit, as for coding itself they're not helpful.

 

Also I think editing Jedi_AI wouldn't be enough, i'd also have to edit all other saberist classes; and I'm not seeing as how could disruptor disintegration could be helpful, just like shadowtrooper's cloak since it's not particularly invisible, just transparent.

Posted

You don't *have* to copy/paste from MP - The cloak powerup "removes" the entity from the map, but you need to make sure that it doesn't have the cloak shader in order to render it completely invisible.

You can search for instances of PW_CLOAK by clicking Edit->Find and Replace->Find in Files, set the take under "Look in:" to "Current Project", and then type whatever you're searching for.

 

But first, you need to create a new powerup, which you can do by right-clicking PW_CLOAK and selecting "Go to Definition", and from there you can type "PW_FORCE_TELEPATHY". After that, you need to make it so that the NPC becomes visible once the timer for the powerup runs out, which you can do by looking at the timer for PW_CLOAK.

 

If it says something like:

if (self->client->ps.powerups[PW_CLOAK] > level.time)

That means it ran past the specified timer for the powerup.

Username likes this
Posted

Mkay,  i also have to make it so that mind trick can be used on jedi; check for force seeing lvl versus opponents mind trick and make enemies react accordingly to the new pawa if they don't have force seeing on par with my mind trick ( ie: instead of them turning off their saber and becoming idle because i'm a hidden entity, they would swing their sabers around trying to hit me nonetheless). I have to do that force seeing check for the player too since rn even if they have it at lvl 1 they can always sense the "cloaked" enemy's presence indicated by a red blob

Posted

Force Sight vs Force Telepathy would be something like this:

 

if (self->client->ps.forcePowerLevel[FP_TELEPATHY] > traceEnt->client->ps.forcePowerLevel[FP_SEE])
{
effect(traceEnt);
}
else
{
counterEffect(traceEnt)
}

 

Also I may have made a mistake with the level.time example - It might actually mean that it's in the middle of playing an event, and not running past whatever value you specify for it.

(ex: event > level.time (0?) + value (Let's say 10) )

Username likes this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...