scot2180
Posts
-
nodebb-plugin-storj-upload :: The Access Key Id you provided does not exist in our records.
keeps coming up when I attempt this -
I cannot seem to upload files without an error message. I am trying all different ways to upload the file including file types.
-
I do note in the "STack Trace" that a error message "Invalid get index '4' (on base: 'PackedStringArray').
-
Morning, I entered that and the script was fine with no errors visible. However, when you go to run it. The text does not appear at all ?.
extends RichTextLabel
@export var texts: PackedStringArray #holds all the sections of text. @export lets you edit it in the inspector.
var current = 0 #a number variable to keep track of which section you are on.
var timer = 0func _ready():
visible_ratio = 1
current = 0func _process(delta):
timer += delta #delta is how many seconds elapsed since the last time the code was run. It might be a bit confusing at first but this code is just to make the timer actually count like a timer.if timer >= 10: #when the timer reaches 10 seconds, reset the timer to 0, and go to the next section. timer = 0 current += 1 #same code as before visible_ratio = 0.01 visible_ratio += delta * 0.07 #scrolling text = texts[current] #set the text to the correct section, depending on the variable "current" if visible_ratio == 1: #resetting scrolling after it reaches the bottom visible_ratio = 0 if Input.is_action_just_pressed("ui_right"): #when the right arrow is pressed: current += 1 #go to the next section visible_ratio=0 #reset the scrolling if current >= texts.size(): #OPTIONAL CODE: checking if it already went to the last section current =0
Any idea why this is happening ?
-
Hi Kymoh,
You have been absolutely fantastic with your support and it has been hugely appreciated.
-
The following script is now in place but another error message is displayed.
The error card is now, "Error at (11,9): identifier "timer" not declared in the current scope. I tried to play about with it. But it did not resolve it.
extends RichTextLabel
@export var texts: PackedStringArray #holds all the sections of text. @export lets you edit it in the inspector.
var current = 0 #a number variable to keep track of which section you are on.func _ready():
visible_ratio = 1
current = 0func _process(delta):
timer += delta #delta is how many seconds elapsed since the last time the code was run. It might be a bit confusing at first but this code is just to make the timer actually count like a timer.if timer >= 10: #when the timer reaches 10 seconds, reset the timer to 0, and go to the next section. timer = 0 current += 1 #same code as before visible_ratio = 0.01 visible_ratio += delta * 0.01 #scrolling text = texts[current] #set the text to the correct section, depending on the variable "current" if visible_ratio == 1: #resetting scrolling after it reaches the bottom visible_ratio = 0 if Input.is_action_just_pressed("ui_right"): #when the right arrow is pressed: current += 1 #go to the next section visible_ratio=0 #reset the scrolling if current >= texts.size(): #OPTIONAL CODE: checking if it already went to the last section current =0
-
Morning, this seems to clash with the next part of script for the text appearing.
extends RichTextLabel
@export var texts: PackedStringArray #holds all the sections of text. @export lets you edit it in the inspector.
var current = 0 #a number variable to keep track of which section you are on.func _ready():
visible_ratio = 1
current = 0func _process(delta):
timer += delta #delta is how many seconds elapsed since the last time the code was run. It might be a bit confusing at first but this code is just to make the timer actually count like a timer.if timer >= 10: #when the timer reaches 10 seconds, reset the timer to 0, and go to the next section. timer = 0 current += 1 #same code as before visible_ratio = 0 visible_ratio += delta * 0 #scrolling text = texts[current] #set the text to the correct section, depending on the variable "current" if visible_ratio == 1: #resetting scrolling after it reaches the bottom visible_ratio = 0 if Input.is_action_just_pressed("ui_right"): #when the right arrow is pressed: current += 1 #go to the next section
The error message received is "Error at (19,1) Unindent doesn't match the previous indentation level."
Line 19:Unindent doesn't match the previous indentation level.
-
Morning
That is absolutely fantastic.
After a bit of playing about I figured it out and got the array etc working. The only issue is that I want it to be automatic. So it jumps from one text to the next after a period of time.
I have a new found respect for what people put into programming when I am doing this. It must also be quite incredible to quickly create something cool like a game once you are really up to speed on all this.
Thanks for the help so far. It is hugely appreciated
-
That is absolutely fantastic, it is weird how sometimes you copy and paste and the code does not work out right. You type it in and there is no issue.
Can I ask how I can get make different sections of script appear one after the other. For example, our club historian has a piece, then the chairman thanking people. Then statistics about both clubs etc. I want to type them both into the one RichTextLabel box but have them appearing one after the other.
If I do it now, write one piece and then the other one below it. It just keeps scrolling down at the bottom of the box and you cannot see it. I want it to be one piece of text at a time.
Example of text I require:
[color=yellow] [font_size=30][b][i] Welcome to our club from Charlie the club historian [/i][/b]
[color=pink] [font_size=20] Welcome to our club that was formed in 2024 and has a long successful career in the league. Many greats have passed through these doors.
[color=yellow] [font_size=30][b][i] Welcome to our club from our Chairman Andy [/i][/b]
[color=blue] font_size=20] Welcome to all our sponsors for todays game and we are thrilled to have you joining us.
These are two separate people with their sections we want to display one by one. We want to do this with many additional data and information.
-
Hi, do you mean the process section in the "Node" tab ?.
-
I have made the adjustments, but where do you enter the script ?
-
I mean if you have a huge amount of text that is too big for the box. Can you get it to scroll down to the bottom of the text and then repeat by going back to the first word ?.
I want to include some history information in some boxes and welcome messages but they will be too long to display in the box.
I want it to start at the top and work its way down to the bottom of the box.
-
Hi @lemu_kymoh
Is it possible to have text that is too much for a box to be scrolling automatically and once it gets to the end, it simply repeats again ??.
-
You are a legend, for the script "texture = load("path to texture")" where would you normally insert this into. I read the little section you sent to me. I am slightly confused. So you can pull the pictures from a folder you create ?
-
Hi @lemu_kymoh where would I put it in the script for this ?
Also, there appears to be an issue with the script that I cannot see why it is flagging it up ??.
-
extends Node
var deck = [] # Array to hold the cards
var currentCard = 0
var currentPlayerGuess = 0 # 0 for lower, 1 for higherfunc _ready():
# Initialize the deck of cards
# Populate the deck with card values (e.g., 1 to 52 for a standard deck)
for i in range(1, 53):
deck.append(i)shuffle_deck() # Shuffle the deck draw_card() # Start the game by drawing the first card
func shuffle_deck():
# Function to shuffle the deck
deck.shuffle()func draw_card():
# Function to draw a card and update the UI
var cardValue = deck[currentCard]
# Display the card value in your game UIfunc on_lower_button_pressed():
# Function to handle when the "Lower" button is pressed
currentPlayerGuess = 0
check_guess()func on_higher_button_pressed():
# Function to handle when the "Higher" button is pressed
currentPlayerGuess = 1
check_guess()func check_guess():
# Function to check the player's guess
var nextCardValue = deck[currentCard + 1]
if (currentPlayerGuess == 0 and nextCardValue < deck[currentCard]) or
(currentPlayerGuess == 1 and nextCardValue > deck[currentCard]):
# Player guessed correctly
# Update UI, maybe move to the next card, and continue the game
currentCard += 1
draw_card()
else:
# Player guessed incorrectly
# Handle game over logic, display result, reset, etc.
passI found this and it says it is basic. I will need to see how it progresses as I might need your help to clarify a few steps if that is ok
-
Hi lemu_kymoh,
Hope you are having a great holiday period and spending time with friends and family.
Thanks for the help so far. It has been interesting getting to play about with the features. Unfortunately over Christmas it was tough as obviously the time of year very much takes over our lives.
I was wanting to develop a game but unsure of a few things I want to do. I was hoping you could help me develop this. The aim is to develop a card game which can be fun for all different people. It is based on a game that was on television many years ago. I will explain the instructions below:
- The first card on the left of the top row gets displayed at random (it would need to be retrieved from a folder containing all the playing cards)
- You have to go guess the next card all the way to the end of the 3rd row. Each time you click on the card it changes to a random card form the folder.
- At the end of the top row. The last card chosen at random gets displayed on the 2nd row first card space.
At the end of the second row. The last card chosen at random gets displayed on the 3rd row first card space. - The cards can never be duplicated after it has been displayed until the first card has been selected at random to restart the game. This essentially is the reset.
I assume this is possible ??.
-
-
Thanks, a couple for you
When you have boxes and you want to put a header as one style and the rest as another style. How would you do that ?. I tried putting a box within a box. It worked but got very messy.Also, the spinbox is handy for scores of the teams. But I cannot see how to increase the font size ??.
Any guides are appreciated
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Hello! A proper introduction (finally)
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts
Basic Layouts