Page 1 of 1

Help with entity attribute .

Posted: Sat Jun 27, 2015 4:01 am
by Vertex
I have a problem ... The juggador touches a box attribute improves your health , but to try to take it, to approach the box, the collision does not allow the object to take health fund , the only way to take it is to jump up box , ponerce above it and the box disappears and the health attribute is increased.

Any suggestions?

Image

Re: Help with entity attribute .

Posted: Sat Jun 27, 2015 5:56 am
by Veleran
We need some screen shots with debug - show entity bounding box and player bounding box set to On, to see how the player bounding box collides the attribute.
I also say that the attribute pickups are easier to spot and pick up when they float above the ground using gravity = false.

Re: Help with entity attribute .

Posted: Sat Jun 27, 2015 4:22 pm
by Vertex
Hello, no matter which entity float around the same thing happens, and how to take ùnhica box is jumping on it.

Here I show a video of the problem.

https://youtu.be/7oCC1SHO_Mg
https://youtu.be/rcN1Y15wcvY

Re: Help with entity attribute .

Posted: Sat Jun 27, 2015 5:26 pm
by Vertex

Code: Select all

//PlayerToPosition(0,0,0); // This line comment , no longer collect box .
Jugador.ControlJugador();								
Jugador.Animaciones();	

Re: Help with entity attribute .

Posted: Sat Jun 27, 2015 6:23 pm
by Vertex
I have tested with the default player RF , and everything works fine , but my player script can not get it to work properly .

Re: Help with entity attribute .

Posted: Sat Jun 27, 2015 6:49 pm
by Vertex
https://youtu.be/kPw4jzFQV8M

My script player can not collect attributes , the player default factory if reality .

Watch the video. My Settings in the entity attribute is as follows .

PlayerOnly False

Bug?

Re: Help with entity attribute .

Posted: Sun Jun 28, 2015 5:06 am
by Veleran
Maybe check if there are any differences between your custom player and the default ones,in the character ini you define which player.ini to use for the Player attributes,maybe there is something there to correct maybe not.

The bounding box of attributes scales up with the actor but i recommend use scale 1 to be sure.

However,i can not see all the attribute settings in the picture you put.You could have miss spelled something like - Health instead of health.

Re: Help with entity attribute .

Posted: Sun Jun 28, 2015 1:09 pm
by Vertex
The drawback is that only the player can take default attributes a Pawn can not take these attributes. In this case it is only possible when you jump over is where you take attribute, but in reality is not the Pawn which takes the attribute , if not the default player because they always occupy the position of the Pawn .

Re: Help with entity attribute .

Posted: Tue Jun 30, 2015 11:18 pm
by QuestOfDreams
For the standard (built-in) player you need to specify the attribute type in the AttributeInfoFile (usually player.ini) before its values can be manipulated (e.g. by picking up Attribute entities in the level).
For pawns you need to use the AddAttribute script command instead.

Re: Help with entity attribute .

Posted: Wed Jul 01, 2015 12:42 am
by Vertex
QuestOfDreams wrote:For the standard (built-in) player you need to specify the attribute type in the AttributeInfoFile (usually player.ini) before its values can be manipulated (e.g. by picking up Attribute entities in the level).
For pawns you need to use the AddAttribute script command instead.

Thank you very much . A question : How can I display an attribute of a Pawn enemy in Hud , and that this alone is displayed when you touch fight this enemy pawn.

Re: Help with entity attribute .

Posted: Wed Jul 01, 2015 4:01 am
by Vertex
https://youtu.be/YuwyD9f7v54
I found this way to update the attribute pawn in a Hud , is the right way ?.

Gsutaría I have an enemy ( Pawn ) , which has its own HUD showing its attribute life , and that HUD is only visible at the time the enemy Pawn is visible.

As I can do this ?.

Code: Select all

// Orden de Configuracion.
	Config[()
	{
             // Attribute Health
		AddAttribute("SaludPawn",0,100,"Jugador");
		SetAttribute("SaludPawn",100,"Jugador"); // Init Value Health.
		
		

		Jugador.yaw_speed = Camara.CONFIG.VELROT;			// Velocidad de rotacion.
		AnimateHold(Camara.ANIM.DESCANSO);					// Animacion de Descanso.
		Camara.ANIM.ANIMPLAY = StringCopy(Camara.ANIM.DESCANSO);
		Jugador.think = "Update"; 							// Orden de actualizacion.
		
	}]
	
	// Orden de actualizacion.
	Update[()
	{
               // Update Hud Player witch value attribute Healt Pawn Player. :D
		SetAttribute("SaludPawn",GetAttribute("SaludPawn","Jugador"),"Player");
		
		
		Jugador.RotacionPersonaje();						// Rotando personaje.
		Jugador.MovimientoPersonaje();						// Movimiento personaje.
		Jugador.AnimandoPersonaje();						// Animaciones personaje.

		

		
	}]