on-internet

Unity: C sharp. Enemy Spawning every Ruund

This is my current code. I want the game to every round remove the current enemy that has been spawned and spawn a new one. It creates the instance of the enemy and then runs other subroutines and once that enemy is destroyed this sub routine is called again. is there a way to destroy the current enemy with this code. IEnumerator setupBattle(int round) { if (round != 0 ) { DestroyTheObject(enemyGo); } int randomIndex = Random.Range(0, enemyPrefabs.Length); GameObject enemyGo = Instantiate(enemyPrefabs[randomIndex], EnemySpawnSpot); EnemyUnit = new Enemies(randomIndex + 1, 2); PlayerUnit = new

Join the discussion →

Australia Passes Tough Legislation Requiring Big Tech to Preempt Foreseeable Harms

Australia's Parliament has passed the Digital Duty of Care Act, requiring online platforms to proactively identify and mitigate foreseeable harms or face potentially billions of dollars in fines. The Record reports: Platforms are required to detect and decrease risks from harmful content and must bolster protections for users under 18 against pornography, suicide and eating disorders. They also must undertake annual written risk assessments and call out major platform design changes such as endless scrolling that create new harms. Under the law, users also will be able to opt out of algorithmi

Join the discussion →

Is there a way to make Chat GPT edit files opened in Delphi?

I have a project open in Delphi and I use the ChatGPT desktop app to make some changes to the code but it instructs me to close the files first in this message: Form1 is open in RAD Studio, though it appears saved. The project instructions allow disk edits only when the file is closed, and Kai’s editor tools aren’t available here. Please close the Form1 tab and tell me when it’s closed; I haven’t made these changes yet. Is there a way to leave the file open while editing ? What does "Kai’s editor tools aren’t available here" mean? And how do I make it available? I use Delphi 13

Join the discussion →

How do I capture Mouse/Keyboard input in my game when it's not the window/application in focus?

I'm trying to design a game in Unity similar to bongo cat where a penguin is fishing and you just do things or type to others, taking each input and turning it into a "wiggle" of the fishing rod. Every 10 wiggles it catches something, and for the most part this works fine, but I've run into two issues; When hitting different buttons in quick succession, or holding down shift to capitalize a letter, it only captures the first input, I have the function in Unity's Update and I thought that's called every frame, I highly doubt I'm typing faster than that so I'm unsure what's going wrong? When the

Join the discussion →

Does reassignment with the same variable name in Rust not allow for reclamation of the originally assigned variable?

Take the following snippet as an example (from the Rust bible): let x = 5; //A let x = x+1; //B My understanding is as follows: The program implicitly defines x as a u32 integer (or some other int type) with a value of 5 (A). It defaults to an immutable type, which means it can only be 'modified' (even though no modification of the original memory is being done) by using the let keyword. The program then reserves new memory for whatever type was implicitly defined in the prior step and binds it to the value 6. Since the new x is not bound yet/not in scope, the 'x' used during the assignment is

Join the discussion →

Guthub custom image runners

I have a task to build GitHub custom image runners. I already have my custom hardened images. But I didn't find any option in GitHub enterprise to create a runner using my hardened image. What is the best way to do it? Do I first need to create a run with GitHub available images? Create a snapshot of it? Customize it and create my own image out of it? But that way, it is reverse engineering. Has anyone worked on it before? In this era of AI, I am requesting real humans. Already tried: creating a runner with GitHub images. but that is the solution, I don't want. I already have hardened images.

Join the discussion →

Sudan is not only war - Sudan is beautiful, kind and strong ❤️🇸🇩

submitted by Germany to asklemmy 4 points | 0 comments Hello everyone, I’m Al-Makawi from Sudan. I want to tell you about my country, not the war you see on TV. Sudan is beautiful. Sudan is the Nile, the kind people, the tea in the street, the smile even when life is hard. Sudanese people are generous. Even if we have little, we share it. Our food, our music, our culture, our hearts are big. Yes, we are going through a hard time now, but Sudan will stay beautiful because its people are beautiful. Tomorrow I will share something important with you, something from my heart to help my people. Tha

Join the discussion →

Confusion between text and number while reading Excel using xlrd

I am trying to read an Excel file using xlrd, inside cells containing a formula using IF : in one case the cell contains a string, otherwise it is the result of a calculation. I get a very odd behaviour : some cells which clearly contain text are considered to be numbers after being read by xlrd. This is annoying because in the code I'm trying to write, there should be a test based on the content of a cell : if the cell contains text then it should be ignored, otherwise I use the value to some other purpose And even weirder, if I modify the formula inside the Excel file (for example I change o

Join the discussion →

Why do american "Marxist-Leninists" love modern China so much?

submitted by Fenloss to asklemmy 5 points | 3 comments In my home country, pretty much ALL the varieties of revolutionary marxists (maoists, trotskyists, stalinists, … ) agree that chinese socialism died with the removal of the gang of four, and that capitalism has been fully restored with Deng. Some might argue that socialism died much earlier, sure, but we all agree on the fact that the modern chinese state is not a worker’s state in any way. And listening to people from various parts of the world, including people who actually participated in revolutions, it seems to me that this is the con

Join the discussion →

How do I implement a yield function for my game engine?

I have a game engine written in C. Every frame, it takes a list of game object structs, each of which has a "tick" function pointer that's executed every frame. However, some of these functions - or other functions called by them - use for loops that need to be executed over multiple frames. How could I implement a "yield" function that allows a function to wait for one executed frame before continuing? For better understanding, here's a pseudocode of my game engine's loop: game_t game; while (!game.shouldClose) { for (int i = 0; i < game.objects->len; i++) { object_t object = (object_t)list_g

Join the discussion →

Anthropic Created a Honeypot To Lure AI Agents Into Misbehaving

An anonymous reader quotes a report from Wired: Researchers at Anthropic have developed Siren, a new honeypot test for artificial intelligence agents. The setup puts agents in realistic simulations designed to tempt them into misbehaving. How they respond will help researchers evaluate the likelihood that new models will go rogue when deployed in the real world, as well as the effectiveness of different safety measures. The test lets agents loose inside one of 26 different simulated sandbox environments. Various features of the sandbox are deliberately misconfigured to allow egress, while an e

Join the discussion →

Re-entering the US only 2 days after leaving on a B1/B2 visa

I’m from Costa Rica and currently hold a valid multiple-entry B1/B2 US visa. I’ve had a trip to New York planned for quite some time, from December 8th to 15th. However, an unexpected opportunity came up to travel to Arizona from December 3rd to 6th to attend a boxing event. This means I would return to Costa Rica on December 6th and travel back to the US on December 8th, just two days later. Both trips are strictly for tourism purposes. Could leaving and re-entering the US within such a short period raise any concerns with immigration officers? Has anyone been in a similar situation or had an

Join the discussion →
Older stories