How can I create a global variable in Script Canvas? [Lumberyard 1.14]

0

I defined a variable in AreaTrigger Entity (Script Canvas) with name Ammo1 variable. How can I use this variable(ammo1) in another Entity (MyPlayer Entity)? Basically, how can I create a global variable in Script Canvas? I think All variables are private in ScriptCavas,How to get my variable in another entity?

I using Lumberyard 1.14, also I making a game with script canvas , I hope receive my answers soon, please add a lot nodes to script canvas , Disappointed with these nodes,Because the number of nodes seems to be very low.

REMOVEDUPLOAD

asked 6 years ago201 views
8 Answers
0
Accepted Answer

I found but I implemented with a other way but my answer is remain.

if persons/person is/are here , you have this problem , You can use this method instead of the variable/variables:

I made Empty Entities for each weapon , I use of SetLocalX / GetLocalX ,SetLocalY / GetLocalY, SetLocalZ / GetLocalZ nodes , etc for implementation ammo value, also relation to different graph sections.

In fact, each Entity is a variable, or each x , each y , each z are three variables , etc :-) I'm really smart ;-)

answered 6 years ago
0

I was asking myself the same question lately ...it seems to me more in the spirit of Lumberyard to use here Events on an entity, empty or other entity already in place, which will contain the global variables that can be in this way in unlimited quantity and of all types like a matrix for example and callable from any other script.

answered 4 years ago
0

You can use script events. Make an event for setting and getting the variable. Anytime you want it just catch that that event catch it in script with the event node for that script event. And every time you set it it will then fire that event wherever that event is placed.

Script events is how you pass around data

answered 4 years ago
0

I found this solution for lumberyard 1.14, global variables could not be used in lumberyard 1.14 😊

We can use script events(Send/Rec global variables) for lumberyard 1.24 now 😉

answered 4 years ago
0

Yes, it's true , global variables & script events 🙂

answered 4 years ago
0

@REDACTEDUSER

In my opinion, there is actually in this 1.24 a lack on this global variable part, as well as on simple things like a complete FiFo node useful to manage asynchronisms such as with Events that modify the current data in a script and basic Maths nodes.

answered 4 years ago
0

After several trials and tests to reproduce something that would correspond to a Global Array ... it's heavy and not practiced with even an impossibility noted here https://forums.awsgametech.com/t/a-consumer-of-an-event-aware-on-how-to-retrieve-relevant-data-a-business-model-barrier/8584/5?u=didier

I think this should be seriously considered as a potential sticking point ⛔ 🚩 ⚠ 📢 before embarking on any development using Lumberyard scripts in the current beta version.

answered 4 years ago
0

Hi @REDACTEDUSER

I'm aware of this situation, I agree with you completely ,Plus, I've been reporting bugs and bugs for lumberyard since 2016 - 2020(Now). I even wrote strategies as different ideas for Amazon & Lumberyard Team in the forum here. https://forums.awsgametech.com/search?q=strategy

There seems to be some ambiguity that Amazon doesn't want to Hire for Grow Lumberyard's team, at least the script canvas team. :thinking: 🧐 I found a lot bugs/defects/problems in script canvas & lumberyard since 2016 - 2020(Now) , I reported most of these bugs and defects and problems.

There is no live stream and no road map at the moment.

You can't make great games with Script Canvas with bugs and many flaws(independent of C++/Lua , ONLY SC), I don't want to disappoint anyone but as a teacher and writer, I try to present positive reviews.

I know that developing and completing a game engine is very hard and time consuming, but people don't wait, people love surprises.

I think Lumberyard Prime is on its way to the final and stable version.

answered 4 years ago

This post is closed: Adding new answers, comments, and votes is disabled.