Kylamon1

joined 1 year ago
[–] Kylamon1@lemmy.world 5 points 2 months ago (1 children)

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.

[–] Kylamon1@lemmy.world 1 points 4 months ago

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

[–] Kylamon1@lemmy.world 0 points 4 months ago (2 children)

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.

[–] Kylamon1@lemmy.world 0 points 1 year ago (1 children)

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

[–] Kylamon1@lemmy.world 0 points 1 year ago (1 children)

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.

 

In this picture you can see it in the title of the one post. I have noticed itnin comments sections as well.

I see this nearly daily.

I remember seeing a different code on comments as well. It was something like  

[–] Kylamon1@lemmy.world 1 points 1 year ago (1 children)

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.