Jump to content
Sign in to follow this  
5133p39

named selection for later added useraction in cpp

Recommended Posts

I modified "dum_mesto_in.p3d" by adding two alone vertices - each is one named selection (vert1, vert2)

Then in config.cpp i wrote (pasting only those important lines):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class test_house: NonStrategic {

model=dum_mesto_in_2

cass UserActions {

class testAct1 {

displayName="TEST vert1"; position="vert1"; radius=2;

condition=""; statement="hint ""vert1""";

};

class testAct2 {

displayName="TEST vert2"; position="vert2"; radius=2;

condition=""; statement="hint ""vert2""";

};

};

};

When i test it in OFP and go to the position of any of those vertexes (vert1, vert2), an action should be added into my action list, but it isn't.

What is wrong?

EDIT:

aha! it must be defined in the 'Memory LOD' (i'm going to test it)

Share this post


Link to post
Share on other sites

PROBLEM SOLVED.

1. The 'condition' parameter in config.cpp cannot be blank, must be [ condition="true" ] instead.

2. Maybe the vertices must be defined in 'Memory' LOD but i am not sure.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×