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 - Lord Vetinari

#1
Quote from: Crimson Wizard on Wed 21/02/2018 13:52:21
Editor:
- Editor uses (and requires) .NET 4.0 and C# 6.0.

Does this means that in the new version we'll be scripting in C#? Nice.
#2
Quote from: Cassiebsg on Wed 20/12/2017 19:22:31
I've reported this problem before too...
Wait until you're working on a different computer with a smaller res... you will never be able to reach those parts... 8-0

Yep, very annoying, but there's a workaround for that too: if you un-maximize (is that a word?) AGS's entire window, you can slide it partially out of the screen, then drag one of it's side to resize it. Rinse and repeat until you manage to reach the hidden corner of the GUI, then restore it to it's original size and maximize it again.
#3
As the title says. Depending on the resolution and size of your monitor and the size of the GUI (especially if you're working with high resolutions), it's possible that some bits of it end up out of the editor window and, unlike rooms, there's no zoom nor scroll bars to move around and see the whole thing.
I'm working on a small test project at 1920x1200, I'm making a status bar that spans the whole top of the screen (and therefore is 1920 pixels wide), and its left side is constantly out of sight; to work with that corner of the GUI I have to hide the Project tree and Properties windows every time to let the main editor window stretch the whole screen, which is not really a big deal but can get annoying after a while.
Would it be doable to add at least scroll bars?
#4
Thank you everybody for the good suggestions! I didn't know that Udemy discounts were so big, I'll definitely keep an eye on it.
I agree with Mandle, keep them coming if you have more.

A couple of straight answers: indentation is usually not a problem for me, unless I'm typing too fast, but then I can easily recognize the mistake and fix it as I proofread the new bit of code. I put this in the same category of typos.
When it comes to naming, I'm always as explicit as possible, even if it leads to variable and functions names that may be a bit too long. I still have some issues understanding what are the standard practices in the various language communities: for example, I was told that Hungarian Notation is a bad habit in statically typed languages, yet it seems that everybody who does videotutorial on C++ uses it (or at least something that looks like it to someone like me who had no idea of what Hungarian Notation was until the first time someone - actually I believe it was Snarky on this very forum - told me not to use it).
Capitalization seems to me a bit random too. I get the capitalizeTheInitialOfAnyWord thing, but then there are subtle variations when it comes to capitalizing the first letter as well, distinguish what is a variable, what is a function, what's public or private, etc, and it seems to change from one language to the other. I came up with my own standard for that, I'll wrap my mind around what actual coders would use and expect when I'll become a bit more confident.

I don't know how you feel about it (actually I'd like to hear opinions), but to me, what stopped me from actually getting into coding until recently, was doing the sensible thing and trying to learn to walk before running. Everybody kept telling me to do small programs that focussed on one topic (like, a program all about loops, another that explored if/else vs switch statements, etc), and I always got bored and put coding aside.
Things started to get traction when I decided to say screw it, start in AGS with a project that was way too big for my own good. Since I was invested in that project, I kept coming back to it even when I was smashing my face against something I did not understand, possibly even more so because I couldn't make it do what I wanted, in a way that the small, safe, test-all-loops-programs never did.
It's entirely possible that this made me learn stuff more slowly than the sensible small programs, but to me coding has always been a way to get things done; I wasn't interested in it by itself until I started to actually understand it. Being "too stupid to understand that it can't be done", as Ron Gilbert said at the end of his Maniac Mansion post mortem, was what made me start to appriciate coding as a thing and not just the boring stuff you have to do before you can play with your shiny new game.
#5
Hi everybody.
I'm a mostly self-tought programmer. I learned the very basics in high school, then dabbled with it in and out throughout the years until a couple of years ago I got infected by the coding virus and started spending way too many weekends writing stuff. I believe I reached the point when I'm quite confident when it comes to the "grammar" of AGS Script, C++ and C#, or at least confident enough to find almost always a way of putting together something that does what I want it to do thanks to the ancient and revered art of the kludge.
I can only describe what I write as the coding equivalent of a splatter movie, and I really want to learn to write better, less messy programs, but I believe that keep trying on my own is not the answer; at least, it has not been the answer so far, and I can't imagine it changing in the near future.

I know that the ideal solution would be to follow a proper course, but that's not an option right now. What resources (ideally online) would you suggest me to get better in this field?

If you feel like sharing, how many of you never had a formal education in coding and computer science and managed to become a good coder? How?
#6
Thank you. No pointers in structs shouldn't be a huge issue in my case (after all, I already wrote a significant part of the "survival" logic using properties, which do not allow pointers either).
I'm not too keen on starting from scratch, at least for now I'll probably just move all that stuff to structs and update the global script functions to reference the structs instances' members rather than the custom properties.

Thank you all!
#7
I'm using 3.4.0, the latest official release (since 3.4.1 isn't officially out yet).

Wait, so there's been managed structs in AGS for this whole time? The wiki says that there weren't and has even a lengthy and rather scary article on how to fake custom struct pointers.
I've been bashing my head against the lack of custom types pointers for such a long time! Admittedly I'm doing something that probably is not meant to be done in AGS, that is a game with a significant survival/simulation component in which you start from scratch, update your tools, have to manage the character's stats, etc, and I've been doing all of that with custom properties because I thought I couldn't use structs.

I'm not that obsessed with the overall lenght of the code, I just don't want to have overly long functions that you don't understand anymore a week after you wrote them no matter how many comments there are. "Encapsulating" stuff (ok, I know it's not proper encapsulation as it's all public, you get what I mean) in structs is perfectly fine.

Given this, I'll probably have to rewrite half my game, but that's a huge relief. Thanks!
#8
Didn't know about #define, that'll be useful, thank you.

As for the structs, going with your example I'll have to then check either via if-else or switch cases which SpaceShip is currently assigned to cShip if I want to get any use out of those nice extra properties like CargoCapacity, and the more SpaceShip instances there are, the messier the function becomes (unless I'm missing something relevant). Also less easier to expand in case later down the line I decide to add new ship classes.
The code becomes much more straightforward and easy to read (especially if you check it back some time later) if I can simply do something like
Code: AGS

void LoadingCargo(int TransferredCargoSize, int CargoID) {
  if ((TransferredCargoSize <= cShip.GetProperty("CargoCapacity") && (cShip.GetProperty("IsCargoHoldFull") == false)) {
    cShip.SetProperty("IsCargoHoldFull", true);
    cShip.SetProperty("TransportedCargo", CargoID);
  }
  else {
    Display ("sorry, we have no room for that");
  }
}


Nine lines, done, and it'll work with any CargoCapacity value I'll ever assign to cShip. But this on the other hand means that I'll find all my non-ships characters with CargoCapacity and all the other stuff that they don't need attached.
How can you do the same as easily with structs?
#9
The title is kinda cryptic due to title length limitations, I'll try to explain more here.

Baically, I've been using custom properties a lot recently, mostly to consolidate stuff and track/set custom statuses. So, for example, I have the inventory items custom properties "batteryCharge" and "powerSetting" (think Star Trek phasers with stun and kill settings for this one, ans ammo for the other one), which allows me to have a single laser gun that behaves differently depending on those properties without the need to create multiple inventory items and swap them to represent the different statuses of the gun. I don't know if this was the intended use for custom properties, anyway it works really well and I find it easier to wrap my mind around design this way for this kind of purpose.

I have two tiny gripes with the custom properties used this way, though: the first is that the editor does not autocomplete or indeed recognize if what you're writing is a thing until you compile, which means that I have to either write down their names on paper or keep opening the custom properties window to check the correct spelling, and I'm missing the easiness of use that comes with the ability to choose one item from the autocomplete list rather than manually typing their names.

The second is that you can only create custom properties per broader categories (i.e, all objects, all inventory items, all rooms, etc), which means that when I use this approach a lot, I end up with a long list of mostly useless properties that are meant to be relevant for one or two objects/rooms/chracters/etc and instead pop up in every single same-type-thingie I create in the rest of the game (the iBucket doesn't need batteryCharge nor powerSetting, but it may need the fullnessThresholds one that is however useless for the iGun, and so on. This would become an even bigger problem if autocomplete will ever be added). Not a big issue per se (even though I don't know how big an impact a large amount of custom properties have on the game's performance and memory usage, if any), but sometimes tracking down the right property in the middle of the other useles ones becomes more tedious that it should be.
Would it be possible to add the option to enable/disable any property from any specific item/object/etc (or at least hide it from it's properties list)?
#10
It works perfectly, thank you!

Even if I'm hopefully leaving the coding side of things soon, I don't want to be a code monkey and I'd still like to understand what was going on. Why does Gui.Processclick does not work? Isn't it supposed to simulate a click of that type in the position I tell it to?
#11
Sorry to bump this up, but I only have the next two weekends and a couple of wordays evening to finish fizing this stuff before a meeting on the 21st of Dicember during which I can probably start to turn this into something and team up with a proper coder, I'm pretty sure I can't figure out in such a short amount of time what's wrong all by myself. Please?
#12
Oh thank God, I feared I had some major rewrite to do.

Thank you, now it works perfectly!

EDIT: actually, I was a bit too hasty, there's a tiny annoying bug. If you select an option and therefore process an interaction, the menu disappears correctly. If you instead click somewhere else that is not another item (say, the arrow buttons to scroll the inventory up and down), the menu stays visible despite the gInteractionsMenu.Visible = false; that I put right after the button check to be sure that it hides any currently existing menu. Any idea why?
The code now looks like this:

Code: ags

function on_mouse_click(MouseButton button)
{
  if (button == eMouseLeftInv) {
    // reset everything to start from scratch
    gInteractionsMenu.Visible = false;
    ListInteractions.Clear();
    gInteractionsMenu.Height = 40;
    ListInteractions.Height = 0;
    
    // set the required variables
    int AreThereInteractions = 0;
    vIntMouseActionX = mouse.x;
    vIntMouseActionY = mouse.y;
    String CurrentOption;
    activeItem = InventoryItem.GetAtScreenXY (mouse.x,  mouse.y);
    if(activeItem != null) { //safety check: pointers can be "null", and if so you can't call methods on them
        ActionNumber = activeItem.GetProperty("Interaction_Number"); //Get the number of custom interactions thisobject/item/hotspot/character has
        int ActionCounter = 1;
        while (ActionNumber > 0) 
        {
          CurrentOption = String.Format("Action_%d", ActionCounter);
          ListInteractions.AddItem (String.Format("%s", activeItem.GetTextProperty(String.Format("%s", CurrentOption))));  
          gInteractionsMenu.Height += 26;
          ListInteractions.Height += 26;
          ActionNumber -=1;
          AreThereInteractions += 1;
          ActionCounter +=1;
        }
        if (AreThereInteractions > 0) {
          gInteractionsMenu.X = mouse.x;
          gInteractionsMenu.Y = mouse.y;
          ListInteractions.SelectedIndex = -1;
          lbMenuTitle.Text = String.Format("%s", activeItem.Name);
          gInteractionsMenu.Visible = true;
        }
     }
  }
  
  else if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
    // This check goes after the inventory one because otherwise the inventory (which pauses the game) will prevent the item check to fire.
  }
  
  else if (button == eMouseLeft)  {
    // the old code for interacting with stuff in rooms
  ]


EDIT bonus question2: how do I use mouse mode Usermode1 on an inventory item? I would've guessed it was with the Other Click On Inventory Item event, but it doesn't seem to work.
To add more info on how this system works with regular rooms interactions, the player's selection from the interaction menu listbox is then handled in a function that I updated this way for handling inventory items too:

Code: ags

function ListInteractions_OnSelectionCh(GUIControl *control)
{
  if (ListInteractions.SelectedIndex == 0) {
    MenuAction_1 = true;
    gInteractionsMenu.Visible = false;
    if (GUI.GetAtScreenXY(MouseActionX, MouseActionY) != null) {
      GUI.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
    }
    else {
      Room.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
    }
    MouseActionX = 0;
    MouseActionY = 0;
    mouse.Mode = 1;
  }
  else if (ListInteractions.SelectedIndex == 1) {
    MenuAction_2 = true;
    gInteractionsMenu.Visible = false;
    if (GUI.GetAtScreenXY (MouseActionX, MouseActionY) != null) {
      GUI.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
    }
    else {
      Room.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
    }
    MouseActionX = 0;
    MouseActionY = 0;
    mouse.Mode = 1;
  }
  //and so on...
}


and finally, the object/character/hotspot events handles what happens based on the MenuAction_x variables.
I thought I could do the same with inventory objects simply by updating the function with GUI.ProcessClick on top of Room.ProcessClick, but evidently that's not the case.
#13
My game uses a custom interaction menu that you guys helped me code a while ago (thanks!)
It works perfectly fine for everything during normal gameplay, but it seems that there's something that prevents it to work or appear when used to interact with the inventory items. So far I handled the inventory via custom buttons in the inventory window itself, now I really want to consolidate the ways the player interacts with anything, plus I wanted to add some custom interactions to a couple of items, so I thought I could easily expand the interction menu's function to work with inventory items too just like I expanded it to work with objects and characters. Apparently I was wrong :P

This is the code for the interaction menu:

Code: ags

function on_mouse_click(MouseButton button)
{
  // called when a mouse button is clicked. button is either LEFT or RIGH
  
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft)  {
    //reset everything before a fresh start on a new interactive element
    gInteractionsMenu.Visible = false;
    ListInteractions.Clear();
    gInteractionsMenu.Height = 40;
    ListInteractions.Height = 0;
    
    if (Room.GetProperty("InteractionMenu_Available") == true) {
      //set the required variables
      int AreThereInteractions = 0;
      MouseActionX = mouse.x;
      MouseActionY = mouse.y;
      String CurrentOption;

      //these are pointers I properly created outside this function because I use them for a couple other stuff too
      activeHotspot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
      activeObject = Object.GetAtScreenXY(mouse.x, mouse.y);
      activeCharacter = Character.GetAtScreenXY (mouse.x, mouse.y);
      activeItem = InventoryItem.GetAtScreenXY (mouse.x, mouse.y);
      
      //Handling Inventory items
      if(activeItem != null) { //safety check: pointers can be "null", and if so you can't call methods on them
        ActionNumber = activeItem.GetProperty("Interaction_Number"); //Get the number of custom interactions thisobject/item/hotspot/character has
        int ActionCounter = 1;
        while (ActionNumber > 0) 
        {
          CurrentOption = String.Format("Action_%d", ActionCounter);
          ListInteractions.AddItem (String.Format("%s", activeItem.GetTextProperty(String.Format("%s", CurrentOption))));  
          gInteractionsMenu.Height += 26;
          ListInteractions.Height += 26;
          ActionNumber -=1;
          AreThereInteractions += 1;
          ActionCounter +=1;
        }
        if (AreThereInteractions > 0) {
          gInteractionsMenu.X = mouse.x;
          gInteractionsMenu.Y = mouse.y;
          ListInteractions.SelectedIndex = -1;
          lbMenuTitle.Text = String.Format("%s", activeItem.Name);
          gInteractionsMenu.Visible = true;
        }
      }

      // Repeat the same code with appropriate pointers for objects, characters and hotspots
      // They have an additional else clause at the end to handle character movement when you're not clicking on something interactable


As I said, it works perfectly during regular room browsing, but nothing happens when the inventory GUI is open.
I checked the z-order of the guis, in case it was drawn under the inventory screen. Nope, gInteractionMenu is set to appear on top of everything else.
I also made it so that the inventory menu didn't pause the game even though it leads to some undesirable behaviour if you click outside the GUI (By the way, any suggestion on how to handle that in case I have to keep it this way?), and of course I also made sure that the inventory item I was clicking on had the proper custom properties correctly set. Still nothing.

Help, please?
#14
Quote from: Ali on Sat 18/11/2017 01:50:21
The Iraq war was a pretty big deal, and fewer than 5,000 American soldiers died. Fewer than 200 British soldiers died, and over here it is widely viewed as having been a disaster. So in a more advanced world in which (we hope) war is less common, 80,000 deaths is enough. Surely?

The Iraq war (I guess you're talking about the most recent one, not the one in the 90s?) was and still is a big deal for the controversy on how it started (basically ignoring the whole international community), for being somewhat unprovoked (no Al Quaeda in Iraq, 9/11 originated in Afghanistan; this was just Bush Jr trying to do something that his father was too smart to do, that is removing Saddham Hussein who, as much as a despicable and cruel dictator he was, was a stabilizing factor in the region that kept extremists OUT of Iraq becase he was too paranoid about them), and for the long term consequences it had (everything we're dealing with now started right there: Daesh/Isis formed around the nucleus of the disbanded Hussein's army, plus the war attracted fighters from basically the whole arab world, plus Isis was - at least initially - backed/leveraged by other regional powers that took advantage of the chaotic situation Iraq ended in because none of the nations who went to war against Iraq had any plan for the post-Hussein as if they hoped that it would go straight to normal because magic, to bicker with each other in an effort to extend their influence).
The war with the klingons has nothing that comes close to this, or if it has, again they failed to show it.

Quote from: Ali on Sat 18/11/2017 01:50:21
I do think that the Klingon prosthetic are a problem, although I like the design. They should have ADRed all the Klingon dialogue. They seem to have solved the Buffy vampire teeth lisp, but nasal sounds come out weird. I love the idea of the Klingons speaking Klingon, but L'Rell seems to be the only one who gets near to it sounding natural. Most deliver dialogue as a series of meaningless barks.

The Klingon language was created purposefully to sound like angry people barking, there's very little that can be done with that. To be clear, I'm not blaming any of the actors for whatever is going on in the Klingon scenes, it's all a production/writing problem. I don't even care if any of the main cast members are Trek fans or not, that's entirely irrelevant for the sake of making a good show and even a good Trek show.
IMO they should've transitioned from Klingon to English, at most keeping klingon around when members of the Federation are listening. I'm sure most viewers can abstract the concept that they're talking in English just for convenience's sake.

I have one thing to praise: I'm happy that Stamets is not The Token Gay Character with everything about him revolving around his sexual oriantation and hamfisted commentary added to it. It's presented in the most natural way possible, and that deserves praise. Unfortunately not much else of his character seems interesting to me, for now.
#15
I have gripes with both shows, but I'm siding with The Orville.

I don't mind McFarlane's brand of humor, I enjoy the whole concept of Star Trek that doesn't take itself too seriously. Indeed it has been marketed in the worst possible way, trying to sell it as a pure comedy/gag show was a dumb move.
My main issue with it is that it seems to be lacking some worldbuilding episodes that give a bit of framework to understand how everything works, plus many episodes leave a lot of questions unanswered, and not in a "we'll let the audience form it's own opinion" kind of way, more in "it didn't even cross our minds that this situation could be interpreted this way too". There will be spoilers, you're warned.
Bortus' baby? The whole episode is very ambiguous about why Moclans are a single-gender species: it seems to swing between it being a natural occourrence to it being some kind of self-imposed alteration, and depending on which one is the topic of the episode turns itself upside-down. If The Stars Should Appear? Yeah, good luck changing two millennia of culture just by showing that their whole beliefe system is just trash. Real life belief systems are constantly debunked and shown to be trash, and the only result is that people cling to them even more fiercely; yet the episode goes for the very clichéed "they finally see that it was all bogus and everything changes overnight". Krill? Why the B-class crew is entrusted with this mission when there's a perfectly fine high class cruiser ready? At least they did not pretend that the kid wouldn't be upset by what they did on board the ship. Cupid's dagger? Darulio is basically a walking rape drug and no one even think to point that out (I'll accept that his culture does not see it as an issue, after all they all work like that, but how come that everyone else on the ship is so nonchalant about it when they find out?)
Despite all of this, the Orville managed to create a cast of characters that is likable and that I care about, that's why it wins.


Discovery, on the other hand, fails horribly both at creating a cast I care about and at telling a compelling story. Its writers seem to have forgotten the golden rule of "show, don't tell". They keep telling us a lot of reason why we should care or be interested, and they fail to show each single one of them which would, you know, actually make us start to care.
They keep telling us that Burnham is the best officer Starfleet has ever had, and they never show us any of her supposedly unmatchable skills except for the rare case when everyone else just gets dragged down to idiot level so that she can shine (no, the tardigrade thingy doesn't count: the guys on the sister ship figured it out before her). The horrible war? Never seen. They give us some casualties number that if you look too hard at them make you realize that actually not much has been happening except for the ships that were destroyed in the pilot and possibly just a couple more. 80000 deaths, they say. Compare it to 60 MILLIONS casualties in WW2 and you see that this is merely a petty border skirmish (that we never see anyway).
No one has yet bothered to explain why Burnam's mutiny is considered the cause of the war, when you had a klingon ship accepting a cease fire then immediatly breaking it and ramming through a ship during negotiations. Burnham roommate is annoying. Saru is The Alien Who Is Always Scared And The Writers Cannot Be Bothered To Come Up With A Second Personality Trait. Lorca is midly interesting, but his character arc suffers because the war is so poorly written.
The make-up is terrible. And not because of the continuty issues about the klingons' look, just because there's so much crap glued to these poor actor's face that they are phisically incapable of acting (same applies to Saru: mouth, eyes and brows are the key elements to convey emotion, one must be seriously mentlly challanged to consider hiding those bits on an actor. Extra weird faces are for side characters or CGI characters that can emote no matter what, not for rubber forhead aliens). Klingons are also halfway incapable of speaking due to the fake tooth inside their mout, even when they are speaking English. As to that the brilliant idea of making them actually speak in klingon with subtitles with scene direction that doesn't consider at all that you have your eyes fixed on the bottom part of the screen to read the subtitles for large chunk of those screen, and you have a nice trainwrek happening almost every time a Klingon appears on screen.
All these complaints apply even if you don't consider that there's "Star Trek" in the title. If you include that, I think that making it a prequel was a huge mistake as it causes more problem than it solves. Actually, let me repharese: it only causes problem, and it solves nothing. I can't see any reason why new fans that came with the JJ movies would care about it being a prequel or sequel (so it's an irrelevant move if the goal is to attract them), and all the inconsistencies are just going to anger long-term fans of the original series. Even if the parallel universe fan theories turn out to be true and they're going to merge it somehow with the prime timeline later, I can hardly find any reason that would improve such storyline by making it a prequel of the original series.

Overall, as I said before this whole rant, Orville wins.
#16
Quote from: Snarky on Sun 15/10/2017 08:23:27
Of course, if you're just using the pointer in a single script, there's no need to make it a truly global variable in the first place â€" it can just be "script-global": defined globally in the script (rather than the header), but not exported.

I know, but there's something on the back of my mind that tells me that I may get a use out of being able to track those values between scripts. If when I wrap up the game it turns out that I don't need that or that I'm running out of global variables (actually, I don't even know if there's still a limit on those I think I remember being a cap at something like 500 in some very old versions; or maybe I just dreamed about that), I'll move the definitions in the script that uses the pointers.
#17
Thanks, that was the issue. I'm not used to the old way of define global variables, and the global variables window for some reason seeom to allow the creation of character* pointers, but not objects*.

Anyway,using a character is a good suggestion for this one, I'll try it, thanks. As I said, though, there is another thing later down the line that might need the solution I described here, so this has been very useful (if anything, at least I understood something).

One bonus question: why the other pointers, defined the same way as the troubling one, worked? Was it because I assigned them a value on the fly via mouse coordinates in the same function I used them?
#18
Hi everybody, I run into another issue.
There's a random chance that an object appears on the floor as my character moves between rooms.
I set up one copy of the object in each room and set it to initially invisible.
Then I defined a global Object *currentRoomLostObject in the global script header (which I know works, because I used it for other global pointers, and they work fine), tried to assign it a value in the room_load function and made a global function that randomizes the chance of it happaning and turns the object visible. In theory. In practice, the pointer is always null, therefore the test run crashes and highlights the line in the method to tell me that there's no value to use in that pointer, but I can't figure out why the assignment does not work.

Code: ags

//this in each room script

function room_Load()
{
    currentRoomLostObject = objLostObject1 //whatever the object script name is in the current room
}

function room_AfterFadeIn()
{
    object_appears_event();
}

// this in the global script

void object_appears_event () {
    int RandomChance = Random (100);
    if ((RandomChance > 90) && (ObjectCanAppear == true)) { //the second one is a global varialbe that tracks if the player has solved a certain other puzzle elsewhere
        currentRoomLostObject.visible = true;
    }
}


Here I simplified the object_appears_event function to remove some bits of irrelevant coreography (that anyway work properly, as the test run complains about the pointer, not everything else), hoing that this helps.
The same error happens even if I assign currentRoomLostObject in the room_AfterFadeIn function, I tried.

I suppose I could repeat the function code in each room rather than make a single global function, but that seems a less elegant solution (besides, I might have another situation that requires to be handled in a similar way, so it's helpful to understand what I'm doing wrong here even if there is a better solution for this case - mind you, advice on how to handle this differently, if needed, are very welcome anyway).

Help, please? I reckon that the issue is that I'm not assigning a value to the pointer in the same function that uses it, but how can a global function figure out which object should become visible if assigning it each time I enter a room doesn't work? Besides, what's the point of a global pointer if I can't assign it's value in one place and then use it in another?
#19
Right, done. I didn't know if I was allowed to change the title that much (even thought the meaning is the same); on some forums I've been on it's stuff that can get you banned, as silly as it might sound.
#20
Oh, now I get it! I missed that the value of the variables matches the view, loop and frame position. Now it makes a lot more sense (I guess I shouldn't try to read code in the evening otherwise I don't understand a thing :P).

Thank you, I'm going to set this up at once!

(Sorry, I can't add a [solved] tag because the title is too long).
SMF spam blocked by CleanTalk