Search Unity

TAG trigger game object script

Discussion in 'Scripting' started by aaronhm7, May 27, 2017.

  1. aaronhm7

    aaronhm7

    Joined:
    Nov 4, 2016
    Posts:
    16
    hello;

    I am looking for a simple script, that will use TAG to turn one game object into another or will create a new game object when two colliders collide who have nothing but TAGS one script and colliders

    example;

    a blue cube with a cube collider and with a blue TAG and a script "turn game object into another game object"
    collides
    with another cube game object that is a red cube with a collider and reed TAG and the red cube game object with out a script at all, turns into a another type of game object such as a blue cube and or the collision creates a NEW game object all together,

    simple as that,

    if any one can help me out here, i would be most grateful and it would be much appreciated

    thanks,

    Aaron Peterson
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Have you learned about colliders, rigidbodies, manual collision checking, comparing tags, instantiating game objects.. and anything else I may have missed in your post? If not, it would be good to learn about some of the basics of Unity. There is a Learn section on the website, with live training examples, tutorials, and sample projects..

    Have you tried to create a script? If so, could you post it?
     
  3. aaronhm7

    aaronhm7

    Joined:
    Nov 4, 2016
    Posts:
    16
    I have been with unity for five years now

    and I know all about the Unity format,

    I have read the whole manual and I look out for small scripts given in the manual that I might use to build my games

    I do not have one script that would complete "my scripts" library and thats the script i am in search of now

    I have the TAG destroy scripts but I do not have and have not found a TAG CREATE game object script, wich is just the opposite of TAG destroy,

    and the BENEFIT of having a TAG script where the TAGed game object can create a game object in stead of destroying would be like the difference between day and night

    these 2 scripts is actually all any one needs to build a simple game

    and with out needing ridgibodies in the game object to make the trigger happen

    the problem with not having a TAG in order to trigger an event is that you need to put the NAME of the game object in the editor and only ONE game object can trigger the event, with a TAGed game object script, it can be more than just one GO

    meaning that all a person has to do is TAG any game object and the trigger event will happen
    also no rigdibodies are needed and the GOs can be spawned as well

    it is to bad that UNITY does not provide this script as a standard asset script and that it is not in the manual or if it is i have not found it yet

    if you can be of any help

    are you a programer?

    Aaron
     
  4. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Just for the sake of saying so, I didn't require 'Tag' and 'Name' to be all caps. :)

    I can program some, yes.

    5 years - that wasn't coding at all in Unity? It doesn't sound like a complicated thing. I offered my previous post as some guidance, but if you already know your way around, just write up a simple script instead of looking for one here?
    I mean that politely, unless you don't program at all, and then we're kinda going full circle..
     
  5. aaronhm7

    aaronhm7

    Joined:
    Nov 4, 2016
    Posts:
    16
    i dont write scripts,

    thats why i am here asking

    Aaron