Avatar

Kylamon1

Kylamon1@lemmy.world
Joined
1 posts • 6 comments
Direct message

It’s still open for a other 40 hours.

Go here: https://www.gog.com/en/game/tropico_4 then clock the link that says go to giveaway.

permalink
report
parent
reply

So player has all these nodes that provide abilities. Each node has a signal that the ability is activated. This is correct. What you do after the signal was your question.

The two options i described were:

#1 don’t just connect to one omnibus function. Don’t connect them all to a _gave_ability() function. This is what it sounds like you are doing. Instead seperate into seperat smaller functions. Connect ability As signal to functionA(), and abilityB signal to functionB(). Then yiu are not checking all 19 cases everything a signal is called.

#2 if you are using the omnibus function _give_ability(ability), set an input parameter for the signal saying which specific signal was emitted. This can be done by code or the inspector when connecting the signal.

Then on _give_ability(ability) do:

match ability: abilityA: Give ability

permalink
report
parent
reply

Without knowing your specific situation, it seems like each of you signals should not be connecting to one master “abilities” function to dole out the effects.

Instead each signal should connect to its own function and that function is responsible for only its specif effect.

====== Another thought would be if you like your setup, change the if statement to a match/case. For many simple if checks the match is more optimized.

permalink
report
reply

I am also learning Japanese. I fine it hard to think of the sentence structure as different than English. In my mind I find myself daying the sentences the way Yoda from star wars does and it makes more sense.

Yoda I am–>Yoda desu

permalink
report
parent
reply

I’m a math teacher. I use my video game making knowledge from Godot to make little video games to review skills. Each takes a few weeks to make with game design, making all the art, programming, and making the worksheet.

Here is my Disco Dj-Demo if you were curious what I mean.

I think it’s fun, it’s not something I can really chat with others about.

permalink
report
reply

As a parent anytime my daughter acted up one of us would take her outside. She would lose her audience and no one wants to hear that. We only had to do that a few tines before just saying “if you keep this up I’m going to take you out side” would put an end to the fit…now that being said my daughter was generally a very easy child to raise and I know that is not always the case.

permalink
report
reply