Jump to content
  • 0
Sign in to follow this  
Indomitus

I think the Visual Scripting could use...

Question

(Starting a thread so we can pull together thoughts and suggestions on the Visual Scripting in one place.)

 

  • I think it needs a way to recognize grouped objects and act on them as a unified entity (move, rotate, etc).
    • ...or maybe I just haven't found it yet.
    • Maybe just by moving the active object in the group (like using it as a handle) with an option to move only that one or the entire group relative to that active point.
  • Repetitive loops could be a lot cleaner if we had an in-line Timer command block, kind of like the "wait" or "sleep" command most languages have.  Then the code for sliding a block gently to one side (for example) could all be inside a single script block, not split between an event listener and a timer, for example.  (What can I say?  I'm a old-school coder.  I like my code neat.)

 

Overall, I like it so far.  I've only had a couple hours yesterday to play with it, though, so I'm not very far in yet.

  • Upvote 2

Share this post


Link to post
Share on other sites

28 replies to this bug / suggestion

Recommended Posts

  • 0

Hi, I can give few short answers to your questions

  • "group of objects" -> for that reason there is "Entity label" game logic objects but it is not designed to move a lot of object together. -> this is surely planned to be implemented
  • "wait" -> unfortunately this is not planned at the moment (technical reasons for it) -> similar function have "delay" block but it will not stop execution of the code. It just execute code inside it when you say. (at specific time or with a delay

Share this post


Link to post
Share on other sites
  • 0

Thank you for the response.

I have tried the Entity Label, and how to use it with Array components.  It does work very well for moving objects together.  My real concern is with Rotation.  There might be a way to calculate that using Vector and Number components, but this would be too complicated for a regular player who only wants to make something turn.  I am glad to hear that something is planned.

As for the "wait" I was only looking for something a bit more simple.  I am okay if this request is too much to include.  The current methods work.

 

Here is some new:

  • Would it be possible to allow movement of Logic objects such as Trigger Zones?  Or do those lock into their location when the scenario is packed for sharing?  I don't see any SET LOCATION or SET ROTATION for Logic objects, so I assume it's not currently an option.
    • My test scenario is this:  I want to have a moving platform, and make the player move with it when they are standing on it, so they can pass over a large pit or other dangerous obstacle.  This can be achieved using Entity Labels, and a Trigger Zone to add or remove them from each player.  At this time, the Trigger Zone has to cover the entire path of the moving platform, or I have to have a zone at the start and a zone at the end.  I would prefer to have a small trigger zone, and make it move with the platform.  That way, the player is moved by the script when standing in the zone (on the platform) and not affected when they leave the zone.
    • Moving or rotating trigger zones could also be used for moving traps and obstacles.
  • If this is not possible, could "Player Interaction" (in Event Listener) include such things as making contact or losing contact?  With that, we could tell if a player is standing on a specific object, or jumping away from it, or being hit by it, and the logic object would not need to move.

 

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0

It needs the Events that have Arguments fixed.

https://imgur.com/a/YK2xtF7

It needs the ability to use notepad to do text-scripting ( visual is awesome but let me at the notepad and provide a wiki with syntax and it gets super powerful )

it needs the object panel on the normal editor to have options for re-spawning entities after they are changed/killed   EG:    Respawn(True/False, Position, Orientation, RespawnTime)

It needs Copy/Paste / Duplicate, Shift Select, Select All Hotkeys

Share this post


Link to post
Share on other sites
  • 0
20 hours ago, greyfoxzb@gmail.com said:

It needs the Events that have Arguments fixed.

https://imgur.com/a/YK2xtF7

For a Trigger Zone, the "Trigger Object" is whatever you set to be what triggers it, in the properties panel for the zone.  If that zone is set up to be triggered when that Rabid Wolf enters it, then "Trigger Object" will refer to that wolf, and you can use Trigger Object anywhere in that block of script to affect that wolf.  You could change its name, or send it 100 meters into the air.  Try it.

 

20 hours ago, greyfoxzb@gmail.com said:

It needs Copy/Paste / Duplicate, Shift Select, Select All Hotkeys

You can duplicate blocks of script inside of a single object.  Hold down CONTROL then click and drag, and it will create a copy of whatever you dragged.  It would be nice to have a way to copy and paste from one Game Logic object to another.

 

 

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0
  • I would like to be able to edit text that is written on notes, using the scripting.  (Like being able to change a note to include the player's name.)
  • Upvote 3

Share this post


Link to post
Share on other sites
  • 0
On 8/30/2018 at 3:21 AM, greyfoxzb@gmail.com said:

It needs the Events that have Arguments fixed.

https://imgur.com/a/YK2xtF7

You can do this in several ways:

  • Set target type (is triggered by) in Trigger zone properties (i.e specific entity, entity type or label)
  • Use IF conditional (if trigger object == Wolf 57)

 

On 8/30/2018 at 3:21 AM, greyfoxzb@gmail.com said:

It needs the ability to use notepad to do text-scripting ( visual is awesome but let me at the notepad and provide a wiki with syntax and it gets super powerful )

Its planed feature, but that is not trivial task, so it is going to take some time...

 

On 8/30/2018 at 3:21 AM, greyfoxzb@gmail.com said:

it needs the object panel on the normal editor to have options for re-spawning entities after they are changed/killed   EG:    Respawn(True/False, Position, Orientation, RespawnTime)

You can respawn entities by using entity templates. You can setup an Event listener to listen to creature death (best way would be use a label) and then spawn it again.

 

7 hours ago, Indomitus said:
  • I would like to be able to edit text that is written on notes, using the scripting.  (Like being able to change a note to include the player's name.)

That is good suggestion I am taking a note.

Share this post


Link to post
Share on other sites
  • 0
23 hours ago, Rudy.cz said:
On 31/08/2018 at 9:47 AM, Indomitus said:
  • I would like to be able to edit text that is written on notes, using the scripting.  (Like being able to change a note to include the player's name.)

That is good suggestion I am taking a note.

Yess please.. This is very useful to make journal for quest list in my opinion. Since I think there is nothing ingame that could write journal-like for quest list, player often forgot what should they do. :D

I like that stylish cat btw @Rudy.cz, hahahaha xD

Edited by V-Alfred
add list, because it's not the quest, it's quest list

Share this post


Link to post
Share on other sites
  • 0
On 8/31/2018 at 5:49 AM, Rudy.cz said:

 

On 8/30/2018 at 10:47 PM, Indomitus said:
  • I would like to be able to edit text that is written on notes, using the scripting.  (Like being able to change a note to include the player's name.)

That is good suggestion I am taking a note.

 

I would like to add the ability to edit signs as well.  And when the feature is added to place notes and markers on maps, allow a way to do this in scripting as well.

The ability to reveal parts of a map (based on coordinates) could also be useful.

 

Aside from the scripting, I am sure I am not the only one who would like to be able to view a full map in the Editor.  I am trying to plan a story adventure, but before I can begin I have to "play" the empty scenario and map the whole thing manually.

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0

I really enjoy being able to create custom interactions with objects that normally would not have them.  I'm already making a simple working computer on a composition I'm building.

Is it possible to manually enable some of the predefined interactions?  For example, could we enable a computer or a table to TRADE, using a storage chest to hold its inventory?  If not, would it be possible to add a method to access it?

Similar to that...

Would it be possible to add custom controls to a Ship Helm or Driver Seat, mapping through existing controls it doesn't already use.  A Ship Helm, for example, that also listens for standard flying controls, reacting to Space and Shift (or whatever keys/buttons the player has mapped to those commands).  Those are not normally used by a helm so they would not interfere with normal control, and could be custom mapped to flight scripts for a real flying ship, or to trigger cannons in a battle without letting go of the wheel.  A driver seat could be extended to include controls for turning engines on and off, or to trigger a boost or special items during a race.

  • Upvote 2

Share this post


Link to post
Share on other sites
  • 0

The tiles for different groups (Entity, Game Logic, String, Number, etc) are color coded to make them more easy to read, which is great.  Would it be possible to also color code the Literals?  I've noticed that a Literal meant for a Game Logic can't be used to refer to an Entity (this makes sense) but they can be hard to tell apart in the script.

 

(Edit:  I feel like I'm trampling all over this board, leaving more comments right now than everybody else.  Surely I'm not the only one diving deep into the scripting like this?)

Edited by Indomitus

Share this post


Link to post
Share on other sites
  • 0
18 hours ago, Indomitus said:

I really enjoy being able to create custom interactions with objects that normally would not have them.  I'm already making a simple working computer on a composition I'm building.

Is it possible to manually enable some of the predefined interactions?  For example, could we enable a computer or a table to TRADE, using a storage chest to hold its inventory?  If not, would it be possible to add a method to access it?

Similar to that...

Would it be possible to add custom controls to a Ship Helm or Driver Seat, mapping through existing controls it doesn't already use.  A Ship Helm, for example, that also listens for standard flying controls, reacting to Space and Shift (or whatever keys/buttons the player has mapped to those commands).  Those are not normally used by a helm so they would not interfere with normal control, and could be custom mapped to flight scripts for a real flying ship, or to trigger cannons in a battle without letting go of the wheel.  A driver seat could be extended to include controls for turning engines on and off, or to trigger a boost or special items during a race.

When I first got Ylands and everything was new I thought flying ships were going to be a thing. I had generated a game that had those structures that use floating platforms and my imagination ran with the idea. Eventually I found out that you can't attach them to your ship to make it fly but I feel like this is something that definitely should happen in the future. Adding balloons in place of masts to create a blimp or steam punk style flying ship is absolutely something I'd love to see added to this game. I'd go as far as to say that the implementation probably wouldn't even be that difficult. Keeping the same speeds and movements as if it were in water wouldn't even look that unrealistic in my opinion. Please think about this Ylands Devs.

Share this post


Link to post
Share on other sites
  • 0

Yes, once we figure out the new scripting, we won't have any problem building them in the Editor.  I would love to see flying craft we could build in Explore mode.  Something like a dirigible, with some really nice steampunk design.  That would be awesome.  It would be even more of a problem if you fell off, though.  There would probably need to be a failsafe where it comes back down to ground/water level if there's nobody in control.

Share this post


Link to post
Share on other sites
  • 0

Okay, back to the suggestions:

Can we have a way to collapse a sequence of tiles?  It would make organization of elaborate code much easier.  Being able to collapse a whole routine would be good.  Being able to collapse loops and if/then blocks inside a routine would be nice too.

Share this post


Link to post
Share on other sites
  • 0

And now for something a little more hardcore:  TYPE CONVERSION.

The options are mostly covered in the scripting commands we have already.  Number to text is implicit, and we can extract info from vectors or objects, and assemble data to make vectors and change objects.

There's one missing piece:  TEXT TO NUMBER

This one is valuable because we might use an Ask Player to get a number from them, either for a randomized riddle, a purchase/trade transaction, or as part of some other script we've built.  The value provided by the AP object is a string, and can't be used to calculate even if what it contains is numeric characters.

I imagine the big hurdle with this one is error handling.  Using the Visual Scripting, here is my implementation of a text-to-number type conversion.  (It's not the most elegant I've ever built, but it does work.)

Since I don't have access to local preferences, it allows the person using it to specify their decimal separator ("." in the US or "," in other countries, for example).  It asks for 2 input values: the string to be converted, and a number value that can be returned if the conversion fails, that they would recognize as a fail value.  (The weakness is that I can't test the second value to make sure it's a number.  Not without some recursion, and...  just no.)

number_conversion_logic.thumb.png.98b7346dd93813be3b1636b791104093.png

I've attached this code (in a Global Storage) as a composition:

 

NUMERIC_CONVERSION_LOGIC.zip

Share this post


Link to post
Share on other sites
  • 0

The various SET ROTATION and SET LOCATION commands need some way to force either WORLD or LOCAL vectors.  We need some way to make that independent of whatever is set for the scenario itself.

I built a composition with internal moving parts (a clock with moving hour and minute hands).  But when I placed it into a scenario and changed the direction it faced, all the rotations started going the wrong way.  I can attach the composition when I get home, if it is needed.

Maybe Rotation and Location within a composition should always be Local?  I'm not sure what to suggest for this, but some way to control it better is needed.

Share this post


Link to post
Share on other sites
  • 0

It would be cool if we could get what a player types in chat so we could make custom commands.

Share this post


Link to post
Share on other sites
  • 0

Comments.  The scripting could use some way to place a comment into the script.  I keep thinking of sharing logic with other players, but then how do I explain to everyone what the purpose is for certain commands or sequences.  Or if I build something elaborate then need to make a change later.  Anyone who has ever had to support or alter another person's code will understand why this is necessary.  It would be nice just to have a non-executing Comment tile we could drop into our scripts.  It could be color-coded plain white to make it stand out.

Edit:  And for the possible purpose of helping teach coding, it's important to teach them to comment their code, IMHO.

Edited by Indomitus
  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0

There are many good ideas! Do not worry that we do not comment each of them. All of them are considered, some of them already planned so keep posting your ideas.

Just one question to "be able to work with local coordinates". I think you are already capable of that. Set position of ENTITY X (Transform position (ENTITY X) (1, 0, 0))

Share this post


Link to post
Share on other sites
  • 0
12 minutes ago, Houp said:

There are many good ideas! Do not worry that we do not comment each of them. All of them are considered, some of them already planned so keep posting your ideas.

Just one question to "be able to work with local coordinates". I think you are already capable of that. Set position of ENTITY X (Transform position (ENTITY X) (1, 0, 0))

I will try that.  It is very possible for me to suggest things I simply have not found yet.

Share this post


Link to post
Share on other sites
  • 0

The ability to change the variable name used in a FOR EACH loop would be helpful in making a script more readable.  It can be very difficult to navigate through "Item" "Item2" "Item3" and so on, especially if we have multiple nested inside each other.  My personal preference is to be able to give them names that reflect their purpose.

Edited by Indomitus

Share this post


Link to post
Share on other sites
  • 0

For UI Panel objects, it would be nice to have a visual of the UI when we are editing the properties, to see where it is positioned, the size, text size, colors, and so on.

Share this post


Link to post
Share on other sites
  • 0

A command that can return object(s) at a specific location, whether they are labelled or not.  It could accept a Vector as input and return an Array including any entities that have that point inside their collision box.

A similar command to test if a point is above or below the ground (or inside/outside, I guess, in the case of caves and tunnels) could also be useful.

Share this post


Link to post
Share on other sites
  • 0

A way to insert a New Line into the text for a UI Object.  I have tried \n, \r and a few others.  Without this, to have a persistent multiline display (such as scores in a VS game) we have to use multiple UI, which takes a lot of time to format and line up.  This would also be necessary when editing is enabled (someday) for notes and signs.

Or instead of allowing a New Line character, give us a way to add rows/lines to the object.  Perhaps as an array.

Share this post


Link to post
Share on other sites
  • 0

If we create a custom interaction for an object, allow us to specify an amount of time the interaction would take to complete (such as with planting seeds or using a bandage).  This would allow for game mechanics such as lock picking, or things like that.  Good: To be able to specify it in the script code.  Better: To be able to set it dynamically during play.

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0

When we use DISALLOW PLAYERS TO JOIN THE GAME, it would be good to be able to specify a message to show anyone who tries to join.  For example if a competitive round is in progress.  That way they know it is part of the game, and we can give them a specific reason, so they know it's not an error.

Edited by Indomitus
gave wrong name for the command

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
Sign in to follow this  

×