Jump to content

subabrain

Members
  • Posts

    194
  • Joined

  • Last visited

Posts posted by subabrain

  1. Hello,


    first - thanks alot for your help - i did the steps you told.

    Its working like you said. but how can i get these arguments in the method:


    void PaintMaterialAction::process(Selection * sel, const Gui3DMouseEvent &, bool selChanged, Type)


    ?


    Okay - gn8 ;)


    Greetz Robert

  2. Hello Guys,


    sorry for the long delay but i dont get it :/


    i tried all things - to manipulate the c++ methods and try to search for solutions but i dont get it!


    i now get it to execute c++ functions with torque 3d but they dont get it to run -> for example:


    ---------------------------------------------------------------------------------------------------------------------------


    grass.cpp

     

    #include "grass.h"
    #include "console/simBase.h" 
    #include "console/console.h" 
    #include "gui/worldEditor/terrainEditor.h"  
    #include "gui/worldEditor/terrainActions.h"  
     
    IMPLEMENT_CONOBJECT(grass);
     
    void grass::set_grass()
    {
     
    	TerrainEditor *edit = new TerrainEditor();
     
    	edit->autoMaterialLayer(-10000, 10000, 0, 90, 100);
     
    }

     

    ---------------------------------------------------------------------------------------------------------------------------



    grass.h

     

    #ifndef _SIMBASE_H_  
    #include "console/simBase.h" 
    #include "gui/worldEditor/terrainEditor.h"  
    #endif  
     
    class grass : public SimObject
     
    private:
    	typedef SimObject Parent;
     
    public:
    	grass() { grass::set_grass(); }
    	virtual ~grass() {}
    	virtual void set_grass();
     
    	DECLARE_CONOBJECT(grass);
    };

    ---------------------------------------------------------------------------------------------------------------------------


    And the TorqueScript:

    grass.cs

     

    function grasses() {
     
       %obj = new grass();  
       %obj.set_grass();
     
    }

     

    ---------------------------------------------------------------------------------------------------------------------------


    okay - but i just need to now how i can paint the material on a certain position :roll:


    please help me - thx a lot!



    Greetings - Robert!

  3. hey there,


    i stuck a little bit :P


    i want to call the method "PaintMaterialAction::process" from torquescript.

    so now i took the following in the c++ code:


    DefineEngineFunction(tesla, void, (), , "")

    {

    PaintMaterialAction::process;

    }


    and the following to the torquescript:


    DefineEngineFunction( tesla, void, (),, "" )

    {

    echo("test");

    }


    so this is not working.

    what do i made wrong?


    Thanks a lot and gn8 ;)

    Robert

  4. hi there,


    okay i made an output from the method and when i press the mouse button while painting.

    So its the right thing :)


    but i have troubles to be able to execute this function by torquescript ... i read some things but i dont know if im right ..


    would be nice i you could help me (maybe i will find it out faster) :P :)


    Thanks a lot for your help!


    Regards -

    Robert

  5. So now you need to know what happens when you press the mouse button on the terrain painter?

    I don't know where this is done, maybe try setting a breakpoint and see what happens, I think it is in terrainEditor.ed.cs

     

    yes thats the point - theres nothing shown in the console or somewhere else in torsion when i do the paint in the terrainpainter :/


    okay but i hope we will get it ;)


    thanks alot - i try to search the "terrainEditor.ed.cs" again :)


    greetings

    Robert

  6. Hello again :P


    as i wrote:

     

    hey guys,


    i find out something good...


    thats how you an set the brush (for painting etc.):

     

    ETerrainEditor.setBrushPos(getWord(%curPos, 0) + %x, getWord(%curPos, 1) + %y);
    

     

    and get the brush:

     

    %curPos = ETerrainEditor.getBrushPos();
    

     

    now i just need to "paint" on the brush position... - maybe you can help me?


    Thank you very much!


    Greetz

    Robert

     


    Sorry that im disturbing you :/


    but i know how to set the position of the brush... i tried to paint through the command Azaezel shows ... but maybe someone could tell me how i get this right?


    i tried to make the player position to the brush one - thats working ...


    i hope you could help me a last time ... would be nice - THANKS!


    Greetings

    Robert

  7. okay here a explanation for what i need this function ;)


    i want to mow a meadow with a ride-on mower i have all but i dont know exactly what can i do in this case. i have a few ideas - do something with the footstep or with triggers or - what i think is the best way - the terrain-painter (call from script).


    So thanks a lot for the answer - but im new to torque maybe you could explain a bit more - so i can understand ...


    okay now you know why i need this :)


    greetings

    Robert

  8. Hello,


    im very happy to see that someone has answered. THX!


    So i just want to make the same like the terrain painter but from the script. I had an idea - set very much triggers and give them an groundlayer :(


    but it is not realizable ..


    i need the command to "paint" the terrain texture from the brush from "terrain painter" somewhere in the map ...


    okay i hope someone could help me :)



    Thanks alot!


    Greetings

    Robert

  9. hey guys,


    i find out something good...


    thats how you an set the brush (for painting etc.):

     

    ETerrainEditor.setBrushPos(getWord(%curPos, 0) + %x, getWord(%curPos, 1) + %y);
    

     

    and get the brush:

     

    %curPos = ETerrainEditor.getBrushPos();
    

     

    now i just need to "paint" on the brush position... - maybe you can help me?


    Thank you very much!


    Greetz

    Robert

  10. hi,


    okay - i have an other plan now.


    Im trying to get the function, which is there for control the paint action from the terrain painter.

    But i tried almost all functions and i dont know how the function is :(


    Please help a last time :)


    Greetings

    Robert


    PS: hopefully the error of your forum is not good for hackers...

  11. Hi again,


    okay - i have a plan now how to do it.


    1. ill create triggers in the torque 3d world editor as big as the groundmaterials should be (first problem i need over 1000 trigger points).

    2. then i add a groundtexture via terrain painter tool in each trigger square (second problem i need over 1000 terrainmaterials).

    3. ill give them the layer 0 with full height groundcover.

    4. now if i enter the trigger the layer 0 there will be another groundmaterial and so another groundcover.


    okay - ill tested this - its working.


    maybe you can give me some tips how it will be better? :roll:


    okay - thanks alot!


    Greetings

    Robert

  12. hey there,


    sorry for awake this thread - but its important for me ...


    how can i use the "position" Member of GroundCover Object?


    is there any way to do it with a workaround? If not ill try with areas ..


    okay - would be nice if you know something about :)


    Thanks a lot!


    Greetings

    Robert

  13. Good Morning,


    its me again :P


    i have a simple but important question ...


    wheres the torque toolbox now?


    i want to publish my game in the future but i didnt see anything like that in the project manager....


    thanks a lot for answers :)


    greetings and have a nice day!

    Robert

×
×
  • Create New...