Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Stranga

#1
Quote from: Crimson Wizard on Tue 27/12/2022 00:16:08Simply hypothetically, it could look like this:
Code: ags
if (TestAllItems("iRope, iHook, iInsurancePolicy")) {
}
where TestAllItems would parse the string and check for all the items there.

But I am currently speculating, as I do not see your real code, so I don't know which kinds of cases you are trying to work on.

Actually @Crimson Wizard I think you're onto something here, I'll play around with it as such. My real code is nothing special to be honest as this is mainly an idea I thought of to see if there was a way to compact it all into something with less code.


Quote from: Khris on Thu 22/12/2022 07:47:57The other thing works very differently:
Code: ags
  if (player.HasInventory(iRope) && player.HasInventory(iHook) && player.HasInventory(iInsurancePolicy)) {
    // ...
  }
  else {
    // ...
  }

Also, @Khris I'm a little worried about you :-\ 
#2
@Crimson Wizard I guess it's not generally for simpler code, just neatening up my old stuff, to be honest. (should have added that in the title) I'll mark this as solved as I'll use the else and if statements as it already work and play around with ideas in my test game.

Thanks again, everyone!
#3
Thanks for pointing out that error, Khris! I meant to say integer.

The function is a basic interactive function, not using an item on something, so I can understand that ActiveInventory would work as I've made switch statements such as that in the past. It was only to check if the player had certain items then the other character would respond without having to type long lines with "if" and "else" statements.

I guess I could run a loop check to check all items in the game and use their ID in a switch statement that way but wasn't sure if it was exactly possible to do so?
#4
My apologies, I should have clarified my intentions. It was going to be used to check if the player had certain items before proceeding. I've been using if and else statements but at the time I was unsure if it were a bool or was using the item's ID, as @Snarky mentioned.

Think about your code @Crimson Wizard, I'm not sure if that would work, would it? As I just want to check the items not exactly use them. 

Just to clarify, it's only to simplify my code and make it a little neater is all rather than:
Code: ags
if (player.HasInventory(iCup))
{

}
else if (player.HasInventory(iSpoon))
{

}

//e.c.t

P.S I was thinking of running loop checks but still I think the fact that it's using a boolean than an integer will still cause the same problem down the road.
#5
Hello everyone,

I'm trying to simplify my code rather than using if and else statements and wish to convert it all to switch statements

For example:
Code: ags
 switch(player.HasInventory(item.ID))
 {
  case 1: do this; break;
  case 2: do that; break;
  default: yadda yadda; break;
 }

P.S I know this doesn't work as I'm trying to find a way to extract the item's ID and use it here but I keep running into a problem of cannot convert an ini into an inventory item.

Any help will be greatly appreciated :)
#6
That did it! Thanks a big one CW!  :=  :-D
#7
Hello everyone,

I am having trouble opening my game, I think it may have something to do with the translation files. Here's the error but I am not sure I understand it correctly:



Any help would be greatly appreciated
#8
Thank you! :)
#9
I can remove the plugin from the demo but I may have to comment out all the steam code. The DLL should be included with all game files as I know the full game works on all storefronts from the feedback I was receiving, however, I'm unsure why the demo isn't. I'll double-check those demo files right away!

The demo on itch was incredibly outdated (almost 2 years old), I've added the latest demo and all should be good to go! :)
#10
Oh shoot! My apologies about the demo, I shall fix that right away! Also, all my games are made in AGS, once I fix the demo you can see for yourself. AGS give me more freedom to be creative rather than work to limitations of RPG Maker :)

P.S the demo on itch.io has been fixed and is free! :)
#11

DEMO link included! See below!






The story is about Ash. An ordinary girl who takes a journey through a mysterious spirit world filled with strange spirits. Ash must find her way back home, before something else finds her. The game is a canon prequel to one of my previous games 'My Big Sister' which will tell the story of the events that led to the red witch.

Screenshots:
Spoiler

























[close]

Languages

  • English
  • Portuguese
  • German
  • Russian
  • Turkish

Links to Game and Demo:
STEAM:
https://store.steampowered.com/app/1259140/Ashina_The_Red_Witch/
ITCHIO:
https://stranga.itch.io/ashinatheredwitch
GAMEJOLT:
https://gamejolt.com/games/ashinatheredwitch/656350

DEMO/PROLOGUE:
Steam:https://store.steampowered.com/app/1259180/Ashina_The_Red_Witch_Prologue/
Itch.io:https://stranga.itch.io/ashinatheredwitch

checkout/follow me on Twitter: https://twitter.com/StrangaGames
#12
This looks great! Love the cyberpunk theme you got going on here, the 3D voxel art really makes this unique. I'm curious, did you take say a "Donkey Kong Country" approach? (3D Models converted into sprite work?) If so, I've always wanted to try this in a future game, it looks stunning!
SMF spam blocked by CleanTalk