Jump to content
Roleplay - PvP - PvE - RP

Need some help with Visual Scripting. =3 P&T

Recommended Posts

So i've been messing with the visual scripting and it's really neat! I've only been able to do little things and was wondering if i could get a little push in the right direction.

I couldn't figure out how to make an Entity Spawn at this time and de-spawn at a different time. i know i must be missing something =3

If you could give me an example SS of the VisualScripting setup for something like this, That'd be the most amazing thing ever! =]

 

I'm so excited about Ylands and where it's going, and i really want to learn about and learn how to use it's functions so i can make awesome(or not, it's okay if you don't like my work <3) stuff!

 

Also if this is the wrong place to post, I'm sorry. I'll do better next time, i promise.

Share this post


Link to post
Share on other sites

You need a little more patience than that.  :D

This sounds just like one of the effects I have in my PVP map (which I'm going to put in the Workshop as soon as I'm sure it's stable).  I have weapons that spawn, but then disappear if nobody picks them up.

There's always more than 1 way to do it, but here's my solution:

  1. For the thing you want to spawn, create an ENTITY TEMPLATE for it.  (Those are under the Game Logic list.  Entity Templates are really good things to learn how to use.)
  2. Create an ENTITY LABEL for it.  You'll use that label to find it again after it spawns.
  3. Edit the script for the Entity Template.  One of the events you can use is ON ENTITY SPAWN.  Under that one add a command to assign the label you created to the "Entity" that the event gives you.  That means every time it spawns, it automatically gets that label.
  4. Entity Templates have to use a different spawn command than just spawning things directly.  You'll find them at the top of the list under ENTITIES>ADVANCED.
  5. Now, if you spawned 1 of them or 1000 of them, you have a full list of all of them available to you.  Just go to Game Logics>Entity Label>GET ENTITIES and give it that label you created.
  6. Since that list is an ARRAY, you can use a FOR EACH loop (under LOOPS) to look at each of them one at a time, and decide to DESPAWN them or not.
  7. You can put the same code to assign the label in a bunch of different Entity Templates, if you want to have lots of different items spawning like this.

If you need more than that, I could probably throw together a short video on it.

Share this post


Link to post
Share on other sites

I know, i know >_< that's my bad.

 

I'll give this a go, thank you very much Indomitusi'm sure that video would be good to make! Ylands is still "New" and there isn't many of them out.

It could help many more people, then just myself and those who read this post =3 

 

Thank you again =3

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×