Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: Dev_Sebas on October 16, 2013, 06:05:17 PM
-
Hi! :)
Just finished this custom action, it let´s you get the main texture splat map name at a certain game object position.
It´s very useful for example if you what to play a certain footstep sound dependent on your game object position. It will only give you the texture name but you can compare the given name and play different sounds, particles. Very useful for fps/rpg games.
WIP-if script can´t get terrain position it will return null.
All the best
Cheers
Seb
-
Thank you.
This feature is useful.
-
If anyone want to finish this action with some new features it would be nice.
Cheers
-
Hi,
Like what features?
Bye,
Jean
-
Hi Jean
Well...maybe by now it´s ok, just thinking about optimisation and debug.
It would be nice if incorporated in ecosystem.
-
Hi,
Ok, It's up on the ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181), and I made an entry on the RSS (http://feeds.feedburner.com/PlaymakerEcosystem)
I have renamed the class for consistency and added some tooltips as well, but basically it's all good as far as I can see.
Bye,
Jean
-
Thanks Jean ;D
-
amazing work you guys.
-
I am using this but generating my terrains dynamically. Can someone show me how to set the Terrain object with a FSmDefault object variable? THe only way I can set a terrain now is to drag it in.
THanks very much for this.
-
Will this only work on terrains, or this can be used with any object like custom made floor object?
-
I am using this but generating my terrains dynamically. Can someone show me how to set the Terrain object with a FSmDefault object variable? THe only way I can set a terrain now is to drag it in.
THanks very much for this.
Anybody?
-
I am using this but generating my terrains dynamically. Can someone show me how to set the Terrain object with a FSmDefault object variable? THe only way I can set a terrain now is to drag it in.
THanks very much for this.
Anybody?
Find GameObject by name?
-
I have done that already and stored it in a object variable. UnityEngine.Terrain but I cannot set the action unless I physically drag the terrain into the action inspector area. There is no way to set a variable to it..... You can ONLY drag it in.
Thus I cannot set it dynamically.
I have tried to alter the action to make it like a FsmDefault drop down but I cannot do it for a Terrain Object. I simply dont know enough about C# scripting to set up the terrain as a "setable" value. I have hacked a way for now by using
Terrain.activeTerrain = terrain;
Which will just get the active terrain in the scene that they are currently above... but if the users goes to another terrain it will crash as the terrain is not the "active one"
Thanks again. I really appreciate the help.
-
Bump. ::) :)
-
I would like a bump as well! I tried adding that feature in the scrip but I can't really find where to put it, I seems like choosing a variable is something standard that automatically comes to all actions, so maybe there is not possible to choose the terrain with a variable? :-\
-
I felt like I had dealt with this on a project and found this action, tweaked from Dev_Seba's action.
Not 100% sure though but maybe its what you're looking for?
-
Hi,
you need to do a ray cast in the down direction, then you will hit the terrain, which will give you access to the gameobject, and then you can query for it name.
have you tried this?
Bye,
Jean
-
Hi!
Yes a combination of your two solutions worked. Used the other action to specifyy the gameobject and a regular raycast to store the terrain.
-
There seems to currently be two scripts for doing this. The older one required you to drag the terrain object on to the variable slot, "hard-coding" it. Not good.
The newer one named "GetTerrainGameObjectTextureName.cs" posted by terri is better. Lets you set the terrain as a variable. However it seems to be in a broken state. I worked out you have to rename three times Void was used with a capital V. It wanted lower case voids.
Only the first one is in the Ecosystem, probably should be removed in favour of the newer one.
Another thing about the second one. It doesn't end. It acts like it's doing it on every frame but there's no option for that. Someone might like to fix it up, cause it's quite a useful action.