How to implement "add effect" to a script from another script

I edited it again. No change.

I think Dynamic physics work better.
The bknife and bodyhit Message sensors better set to “Or” if you combine them. Or give each his own “And”-controller.

The Message “Pdie” alone does nothing. You also must send “Phit”.
Also this all only works if you are eqipped with the weapons.!!!

All the Message Sensors for Filters are redundant. Or did you remove them from the Camera?
The will only have effect when you use the menu and enable them with the mouse.
If you want the filters to always be enabled then you must replace the Message sensors with “Always”-Sensors.

So I got it wrong on the no ‘or’ for the message bricks, and then for the remove player I got that wrong for using pdie?

I used the filters as the original AI has them the same setup. I don’t need them for a new AI object.

I didn’t know about or and I removed the states, as you don’t have them there.

Yes, set it to “Or”. If you have it set to “And” this means you have to hit the enemy by shooting and with the knive at the same time (which is impossible)

“Pdie” sets the player’s health to 0. But nothing happens unless you also send a massage “Phit”.
You must have the message brick “Phit”.
If you want that the player dies immediately when colliding with the enemy, then easily add the Message brick “Pdie”.

The program does remove the AI, I think, but the object model still floats around. The cube is the parent.

looks really spooky :ghost:

It could be the AI just isn’t quite suitable for the game, it is uneven.

I will try a different one.

But yes, I couldn’t get the door to work, the animation works, as the video showed previously, but only the original door seems to work.

the existing AI. That went through the walls in the level.

The movement of the AI looks very strange. It moves very far but doesn’t rotate.
I suppose there is something wrong with the parenting.
Usually it should be like this:
Cube is parent of armature.
armature is parent of object mesh.
Perhaps you did make the cube the parent of the object mesh?

Correct.

Cube is the parent of the armature, and the armature is the parent of the object. The object was much bigger from an old character, I edited even more just for try so that doesn’t work. It is the design of it.

Fortunately, another AI does work okay for it.

I’m more concerned about the interaction of the environment, the AI is ready, since there is the existing AI, but to add or change the level, and add a working door somewhere else is my real concern. In order to expand the existing level or reform it.

Fantastic! :+1:

The door triggering in the level is designed quite complex.
You could just use a “Near”-Sensor and a keyboard Sensor that together (“And”) would trigger the door action. (playmode: pingpong)

But of course the original doors action with the text and player animation is a fine thing.

Edit:
I tried duplicating the 1st door.
There are 5 objects to duplicate, some logic bricks to alter and 2 python scripts to edit for every new door. No thanks :slight_smile:

Edit2:
Or if you managed to duplicate these objects, then it would be sufficient to turn off the message Actuator for the “cutscene” on the door trigger. Then the door opens and the player doesn’t position itself on a wrong place (this is what the “cutscene” means. It positions the player. But we could leave that away)

Here’s the easy way to make new doors work to open and close.
No need to duplicate 5 objects, just the door.

Sure that works, I have trouble going through a new door. The player can’t seem to travel through the door between two new walls.

They are static with an actor, but the door scale is wide enough for the player.

Thanks for that suggestion.

I did scale it down. The player object.

I added a new object for an additional AI. It hasn’t worked out too well.

I took the Ai from the siltent hill corridor demo, nice atmosphere in that game. I couldn’t really make much of that, everything uses layers. So no weapon for the player in that file, was probably made using 2.74. I tried in 2.75 it works okay, the file is 336mb. Available on youtube.

It needs a weapon, and some tasks, I think. It is a very good attempt.

I did add the Knife AI from the demo into this file.

I tried to unpack the files of that file, only gave errors in 2.75.

Some of the files could be useful.

But the AI stiff just floats in the FPS. Not sure on that.

The program bricks having something to do with it.

The silent hill file, it just loads and animates after the player walks through a number of doors, been here again type of scenario. Has an animated skeleton of the head moving around. :laughing:

Most of it can be removed, it isn’t useful for my file. It did save a sound with it. :face_with_raised_eyebrow:

The corridor level section could be useful, I was able to use 2.72 to keep the sounds.

That by itself is 150mb. Nice setup.

Just use the player from the FPS, and edit it from there, I think any edit of that is complex, since it uses layers for different objects, lights, shadows.

The doors are okay, it is the Ai that is the problem, and working out a scenario using what there is. The two AI doesn’t work out too well, and there is the existing AI, so that is all there is for that area. Open a door into one area, and then into another, an AI loads or Near or radar, trying to navigate an area, to avoid the AI.

Even with the new AI, the bricks only terminate the player after one collision, so there is no actual harm to the player until the removal of the player.