Knightware Lorewaster Posted September 17, 2021 (edited) Let's say I need to check a floor where the texture was changed, but I don't know which texture it was changed to, as this new texture is in a list of 5 textures, I know the names of the 5... but I don't I know which one, which of the 5 textures that was used to change the floor, if I know which one, then I check which one it is, and a weapon appears on the green floor... Edited September 17, 2021 by Knightware Lorewaster 0 Quote Share this post Link to post
Rifleman Posted September 17, 2021 There is no function that just checks which floor is where and returns the name, CheckActorFloorTexture only checks if it's the one you specified or not. I guess you could try making some kind of switch or if/else, but seems unnecessarily complicated - at least for me :) Since you already know which texture is the one that spawns the gun, maybe you could use a check like script below, to spawn the gun if and when the texture changes to FWATER1. If it doesn't, it won't spawn anything, and you don't need to know the name of the texture. script 3 OPEN { if(CheckActorFloorTexture(23, "FWATER1")) { SpawnSpot ("Shotgun", 23); Terminate; } Delay(1); Restart; } 0 Quote Share this post Link to post
Knightware Lorewaster Posted September 17, 2021 (edited) Hello my friend, My idea itself I'm trying to figure out a perfect explanation because what I'm doing is very complex... for example... I think of something like I have 2 switches, the 2 have a list with 5 colors... however only one of them uses random colors and knows which color was chosen, and the other one does not know and needs to find out which color was selected, for him to perform the function of showing the weapon... practically he would have to check the 5 colors and if it is possible for him to know what color it is, then he makes the weapon appear... (Practically a different script, knowing what the other changed... checking all the possibilities... Script #2, knowing which texture script #1 changed... without them communicating, just the 2 having the list of textures...) Edited September 17, 2021 by Knightware Lorewaster 0 Quote Share this post Link to post
Rifleman Posted September 17, 2021 I created a mockup that's good for one use, if it was to be used more than once, it would have to be changed again. Basically it uses exclusion to find out the texture, and you need to put the names in. I used 3 to make the example. Maybe someone knows a more elegant solution :) str CheckFloorAfterChange = ""; script 3 (void) { until(CheckFloorAfterChange != "") { switch(CheckActorFloorTexture(23, "FWATER1")) { case 1: CheckFloorAfterChange = "FWATER1"; break; case 0: break; } switch(CheckActorFloorTexture(23, "BLOOD1")) { case 1: CheckFloorAfterChange = "BLOOD1"; break; case 0: break; } switch(CheckActorFloorTexture(23, "NUKAGE1")) { case 1: CheckFloorAfterChange = "NUKAGE1"; break; case 0: break; } } Print(s:CheckFloorAfterChange); } 1 Quote Share this post Link to post
Knightware Lorewaster Posted September 17, 2021 (edited) 29 minutes ago, Rifleman said: I created a mockup that's good for one use, if it was to be used more than once, it would have to be changed again. Basically it uses exclusion to find out the texture, and you need to put the names in. I used 3 to make the example. Maybe someone knows a more elegant solution :) str CheckFloorAfterChange = ""; script 3 (void) { until(CheckFloorAfterChange != "") { switch(CheckActorFloorTexture(23, "FWATER1")) { case 1: CheckFloorAfterChange = "FWATER1"; break; case 0: break; } switch(CheckActorFloorTexture(23, "BLOOD1")) { case 1: CheckFloorAfterChange = "BLOOD1"; break; case 0: break; } switch(CheckActorFloorTexture(23, "NUKAGE1")) { case 1: CheckFloorAfterChange = "NUKAGE1"; break; case 0: break; } } Print(s:CheckFloorAfterChange); } WOW!!! U ARE A GENIUS!!! YEAHH!!! GOD BLESS YOU!!! Edited September 17, 2021 by Knightware Lorewaster 0 Quote Share this post Link to post
Rifleman Posted September 17, 2021 Whatever it is, I don't see it. I copied it straight from the editor and it works for me. I've attached my version, you can see it there - it's just bastardized version of your map :) CHECKTEST.zip 0 Quote Share this post Link to post
Knightware Lorewaster Posted September 17, 2021 (edited) It worked!! a bug had happened here... I managed to solve it, your program is perfect! You are a genius thank you very much!!! Edited September 17, 2021 by Knightware Lorewaster 1 Quote Share this post Link to post
Knightware Lorewaster Posted September 19, 2021 Rifleman my friend, What would it look like to be used more than once? 0 Quote Share this post Link to post
Rifleman Posted September 19, 2021 I think adding this line should take care of it: str CheckFloorAfterChange = ""; script 3 (void) { CheckFloorAfterChange = ""; until(CheckFloorAfterChange != "") 1 Quote Share this post Link to post
Knightware Lorewaster Posted September 19, 2021 It almost worked, but this time it stops the switch... 0 Quote Share this post Link to post
Rifleman Posted September 19, 2021 Not sure what you mean by that, it seems ok to me. Do you have the switch set to be repeatable? I've attached a short vid of how it works for me and the map. checktest.zip 0 Quote Share this post Link to post
Knightware Lorewaster Posted September 19, 2021 (edited) This works without: "CheckFloorAfterChange =" "; But I need to work with him, when you put it on, the switches stop. With an "intermediate" = (slime01 / brown) I can do the 3 run... download: EXAMPLE.rar Not using: ("CheckFloorAfterChange =" ";) Using: ("CheckFloorAfterChange =" ";) I need it to work with this: CheckFloorAfterChange = ""; Like this: Edited September 19, 2021 by Knightware Lorewaster 0 Quote Share this post Link to post
Knightware Lorewaster Posted July 9, 2022 a big secret revealed, first date of the feat: 10/08/2021 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.