Hi all!!
Im trying to create a item wich summons a placeable of a wall (muro) and two copies in each side of it so its longer.
#include "x2_inc_switches"
#include "X0_I0_POSITION"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
if(nEvent != X2_ITEM_EVENT_ACTIVATE)return;
object oPC = GetItemActivator();
location oL = GetItemActivatedTargetLocation();
object oMuro = CreateObject(OBJECT_TYPE_PLACEABLE,"muroarcano", oL);
vector vMuro1 = GetPosition(oMuro);
object oMuro2 = CreateObject(OBJECT_TYPE_PLACEABLE,"muroarcano", Location(GetArea(oPC), GetChangedPosition(vMuro1,5.5,180.0), GetFacing(oMuro)));
object oMuro3 = CreateObject(OBJECT_TYPE_PLACEABLE,"muroarcano", Location(GetArea(oPC), GetChangedPosition(vMuro1,-5.5,180.0), GetFacing(oMuro)));
So, this is suppoused to create a wall and then another wall on each side.
But in game, depends where the player is facing in the map where it puts the walls. Some times aside as i want, but in other positions it puts in diferent angles.
This is what i want:
|
|
|
Other results depending on the facing of character:
| | |
|
|
|
etc.
why is that?