Hi, I'm pretty new to gamemaker and I'm trying to set a variable (global.b1) to the first value of "global.level_data". For example, global.b1 will be set to mimic the blue outline of "global.level_data"'s first value, which is 0. Can anyone tell me how to do this?
Get value in variable
217 Views Asked by Random Account At
1
There are 1 best solutions below
Related Questions in GAME-MAKER
- GUI will only Work for Newest Towers and I Don't Know Why. (Gamemaker)
- Destroy Sequence after being played in Game Maker
- Variable isnt properly checked in if statement
- Transparent Window with Clickthrough and on Top
- Sprite_index is not set
- I want to create a One-Way platform in GameMaker, how?
- How can I alternate between three points with the camera?
- Fisheye effect in GameMaker Ray Casting
- How can I make it where I automatically move in a certain direction (Purpose is for wall jump)
- game maker modifying windy woods game
- How can i make text showing up after some period of time?
- Falling animation plays throughout the whole jump?
- Gamemaker - Retain Overlapping with collision
- Gamemaker not able to connect on port when running Debugging Mode
- Implementation of Dijkstra algorithm in GameMaker studio
Related Questions in GAME-MAKER-LANGUAGE
- How can I use place_meeting to determine if two objects are no longer colliding in GameMaker Studio?
- GUI will only Work for Newest Towers and I Don't Know Why. (Gamemaker)
- Problem about sprite rotation and collision in GameMaker Studio 2
- How can i make text showing up after some period of time?
- Inverted Controls when doing horizontal collisions in gamemaker studio 2
- How would I go about making a propulsion system within my game?
- Timer variable not counting down in GameMaker Studio 2
- How to draw sprites on an arc pattern in GMS2?
- Textbox in Gamemaker deleting
- Jumping animation with landing and jumping sprites
- String Length changes if it is pulled from file
- Unknown variable floor_tex on Gamemaker 8.1. How to fix it?
- Error on Handle Collisions in Corners - Gamemaker Studio
- Spawning Enemies on Game Maker
- Malformed Assignment
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

If I look at it correctly, you want to get the first value of an array
I think this should suffice:
It may look confusing if you're not familiar with how arrays work, but the
[0]represents the first value of the array (which happens to be 0 as well). The count of arrays also starts with 0 instead of 1.For further understanding about arrays, I recommend reading this: https://manual.yoyogames.com/GameMaker_Language/GML_Overview/Arrays.htm
And as a side note: if you're creating new variables, the values in that variable will usually not update it's original form (e.g. changing the value
global.b1will not change the value inglobal.level_data[0]unless you set that yourself).If you prefer the latter, then I think you're better off using
global.level_data[0]for getting and setting directly