Aller au contenu

Photo

Placeable Use Points ?


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

#1
BioSpirit

BioSpirit
  • Members
  • 261 messages
Does anyone know the meaning of Translation and Rotation data in a placeable use points ? 
How does it define a use point ?

I need to create a placeable that should be usable from everywhere. What should I put in the Translation and Rotation ?

Modifié par BioSpirit, 27 mars 2010 - 10:37 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
To make a placeable useable from everywhere it doesn't actually need a use point. You need to generate the pathfinding patch for your placeable 2da and you need to set the interaction radius of the placeable in your area to be as big as you want.

#3
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
What exactly are use points for then?

#4
Eshme

Eshme
  • Members
  • 756 messages
Yep same question as chewy, and adding to that, are the names important? IE UserPoint01 is that important for a purpose? Or can it be anything?

#5
Craig Graff

Craig Graff
  • Members
  • 608 messages
They define the default interaction point. This is the place the character will attempt to path to when the interaction radius is 0 (the default). I believe it is also the origin point for the creature/placeable interactions like the ones defined in ambient.xls.

#6
BioSpirit

BioSpirit
  • Members
  • 261 messages
I was presuming that the nUseActionId in a code below would identify the usepoint being clicked. For an example if I have a statue with a different use points in a left and right hands. Obviously I got it all wrong.

So, a use point is just a point where the user should go when trying to use a placeable.  Like in a front of a chest when trying to open it, right ?

In that case the location and the rotation data would be defined in a reference frame of the placeable, right ?


case EVENT_TYPE_PLACEABLE_ONCLICK:
{
int nUseActionId = GetEventInteger(ev, 0); //
}

Modifié par BioSpirit, 01 avril 2010 - 01:54 .


#7
Craig Graff

Craig Graff
  • Members
  • 608 messages
I'll try to ask an artist for you today.

#8
Craig Graff

Craig Graff
  • Members
  • 608 messages

Lee Scheinbeim:
As far as i know, translation just gave the usepoint's position and rotation gave its orientation which was supposed to control what direction a character would face when using the placeable.


I think the only placeables with multiple use points were doors, basically because if the door is closed, there is no path to the usepoint on the other side and pathing might fail.

I believe that the rotation is relevant to some ambient placeable interactions, but these weren't used that much.

Modifié par Craig Graff, 01 avril 2010 - 04:43 .


#9
BioSpirit

BioSpirit
  • Members
  • 261 messages
I made some testing with the use points and it looks like a PC doesn't use a use points, only a NPC does when commanded with InteractWithObject(). CommandUseObject() doesn't use a use point either.

#10
Eshme

Eshme
  • Members
  • 756 messages
Interesting. What about 2 or more usepoints? Chewy sais they are indexed by front or back, but i cannot see that.

Will the NPC pick a random one perhaps?



I would test but i dont know how to command a NPC

#11
BioSpirit

BioSpirit
  • Members
  • 261 messages
There is no parameter in the *.mmh that would indicate the "front" or "back" usepoints. It's possible that the information is not used by the engine. It seems to appear only in the *.xml file. Of course it's possible that GraphicsProcessorMMH would automatically create a usepoint based on "front","back" information in the *.xml but I am just guessing here.

The easiest way to command a NPC to do something in a testing purposes is to put something in the spawn section.

1. Create a new script.
2. Select templates / Custom creature events.txt
3. Replace the SPAWN section with following code
4. Assign the script for a new creature.

case EVENT_TYPE_SPAWN:
 {
       object oTgt = GetObjectByTag("hus_barrelblow");
       AddCommand(OBJECT_SELF,CommandUseObject(oTgt,PLACEABLE_ACTION_USE));
       break;
 }

Or,

 case EVENT_TYPE_SPAWN:
  {                                     
           
        object oTgt = GetObjectByTag("hus_barrelblow");  
        InteractWithObject(OBJECT_SELF, oTgt, 3, 272);
        break;
 }

I suppose the nInteractionId (i.e. 3) comes from SyncAnimations.xls.  Id 3 should initiate a sleeping interaction but I haven't been able to get it working.