change groundcover via script

There are no stupid questions, just stupid answers.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 8
74 posts Page 3 of 8
subabrain
Posts: 133
Joined: Sat Aug 20, 2016 4:58 pm
 
  by subabrain » Sun Jul 02, 2017 4:36 pm
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
JeffR
Steering Committee
Steering Committee
Posts: 757
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Mon Jul 10, 2017 4:06 pm
Whoops, sorry! Somehow had missed this.

Ok, so just to clarify, you're trying to set the terrain texture on a spot on the terrain at runtime in the game - like, say if you built a house, and it'd put a dirt texture on the terrain so the grass wouldn't render where the house is.

Is that a correct breakdown of what you're trying to do?
subabrain
Posts: 133
Joined: Sat Aug 20, 2016 4:58 pm
 
by subabrain » Mon Jul 10, 2017 6:55 pm
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
Azaezel
Posts: 384
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Mon Jul 10, 2017 9:18 pm
Bit tricky.

If you only need it during a singleplayer session, you'll want to do something similar to

https://github.com/GarageGames/Torque3D ... int.cs#L47

+

https://github.com/GarageGames/Torque3D ... int.cs#L32

+ the painting command you found earlier.

multiplayer, a naive approach would be keeping a log of all of those commands and run them for the connecting client as well. possibly using https://github.com/GarageGames/Torque3D/pull/959 (assumign it is still capable of being rolled in) to take a snapshot from before they began the loading process to cut down on how many additional updates a given terrain file would need to sync.
JeffR
Steering Committee
Steering Committee
Posts: 757
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Mon Jul 10, 2017 9:26 pm
Also, how fast does this need to happen? Is it going to be a constant repainting of surfaces, like in Splatoon? Or will it be a less common event like my 'build a building' example?

How often the event happen would determine how efficient we need to make it. If it's not a constant thing, then doing stuff like the log of the changes in MP az mentioned and whatnot as opposed to a more elegant solution is fine.
subabrain
Posts: 133
Joined: Sat Aug 20, 2016 4:58 pm
 
by subabrain » Tue Jul 11, 2017 7:39 am
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
subabrain
Posts: 133
Joined: Sat Aug 20, 2016 4:58 pm
 
by subabrain » Tue Jul 11, 2017 8:00 am
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
Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Jul 11, 2017 12:22 pm
How about attaching the terrain painter to the player model with size 1? Just an idea.
subabrain
Posts: 133
Joined: Sat Aug 20, 2016 4:58 pm
 
by subabrain » Tue Jul 11, 2017 12:37 pm
Hi,

yes that sounds good - but how can i attach it?

thx a lot ;)

greetz
Robert
Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Jul 11, 2017 1:27 pm
No idea, learn to search for it.
I would make it as a weapon and while wearing the weapon or using it, put the function that paints the terrain there instead of damaging something.

Get Torsion if you do not have already and make a breakpoint to see what functions the engine calls when you do something.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 8
74 posts Page 3 of 8

Who is online

Users browsing this forum: No registered users and 4 guests