-
Posts
194 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Articles
Docs
Gallery
Posts posted by subabrain
-
-
Then it will probably be in the C++ source code.
I looked it up for you and it may be this one:
i think this is the key - but how to execute this method?
i tried to make an instance and all the method ... but whats with the arguments?
please help me -.-
Greetz
Robert
-
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!
-
hi,
sorry i didnt get it :(
greetz
Robert
-
hi,
okay now i found out how to call a c++ method from torquescript.
Now i only have to execute the PaintMaterialAction::process method - but im sure to find it out ;)
greetz
Robert
-
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
-
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
-
hey - thanks alot for this answer :)
i will try to modify 8)
edit: yes it seem to work - thx!
greetz
Robert
-
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
-
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
-
Hi,
yes that sounds good - but how can i attach it?
thx a lot ;)
greetz
Robert
-
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
-
hi there,
sorry i want to apologize!
but i just tried everything and thats really hard to know that im new to torque engine and nobody can help.
please dont understand this wrong ...
so thanks anyway!
greetings
Robert
-
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
-
hi there,
sorry i cant get it :(
please help me i just need the command to create a material like the terrain painter.
i dont get further ... its really important for me.
greetings
Robert
-
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
-
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...
-
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
-
hi,
okay - i will do it with the layer property from the groundcover ;)
greetz
Robert
-
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
-
hi,
okay - i see... ill give a try - thanks a lot ;)
greetz
Robert
-
ok - i see.
thanks!
-
hi,
i got it:
localClientConnection.player
;)
greetings
Robert
-
hi,
ah okay - and how can i build a project?
Thanks and Greets!
Robert
-
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

change groundcover via script
in Beginner
Posted
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