Change sprite of standard cursor

Started by JackAnimated, Wed 06/02/2019 13:03:58

Previous topic - Next topic

JackAnimated

Sorry guys its been years.
I'm back and I've forgotten everything so please have patience while I ask a bunch of very dumb questions.

Firstly:

I've uploaded new sprites for my cursors into AGS. I've gone to the cursor node and set all of them to the no# of my new sprite image. I build and run my game and its still using the default cursor sprite. Please help.

Massive thanks.

Jack

Slasher

#1
Have you tried 'Rebuild all files'?

What Template are you using?

If you have done what you said correctly then there must be a confliction somewhere I guess..

Mind you, it is not uncommon for objects not taking a new sprite number until you exit and restart and change object number again.

JackAnimated

Great! It was the rebuilding shinanigans. Worked a treat. I'll remember to do that.

Crimson Wizard

Quote from: Slasher on Wed 06/02/2019 13:15:21
Mind you, it is not uncommon for objects not taking a new sprite number until you exit and restart and change object number again.

How often or under which conditions does this happen? This sounds like a bug which needs to be fixed.

JackAnimated

Next dumb question:

I'm making a game with 1920 x 1080 resolution. Its displaying full size in the room preview window.
Is there a way I can preview it at 75% or 50% for easier viewing?

Khris

That's possible as of the 3.5.0 alpha:

- Improved how Room zoom slider works, now supports downscale.

Slasher

#6
Quote from: Crimson Wizard on Wed 06/02/2019 13:25:48
Quote from: Slasher on Wed 06/02/2019 13:15:21
Mind you, it is not uncommon for objects not taking a new sprite number until you exit and restart and change object number again.

How often or under which conditions does this happen? This sounds like a bug which needs to be fixed.
It just seems to happen quite often, even with Build 3.4.1.15. I change sprite number in properties but it shows old sprite number. It's as if it is holding on to the old sprite number. It does not occur all the time I may add.

Crimson Wizard

#7
Quote from: JackAnimated on Wed 06/02/2019 13:26:12
I'm making a game with 1920 x 1080 resolution. Its displaying full size in the room preview window.
Is there a way I can preview it at 75% or 50% for easier viewing?

Zoom out was not supported earlier unfortunately (games of that high resolution are not very commonly made with AGS), but as Khris mentioned this is implemented in new wip version of AGS (3.5.0), as well as support for larger resource files and number of assets.


Quote from: Slasher on Wed 06/02/2019 13:39:35
It just seems to happen quite often, even with Build 3.4.1.15. I change sprite number in properties but it shows old sprite number. It's as if it is holding on to the old sprite number.

I don't remember anyone reported this before. Does this happen in the editor (for example, object is drawn with old sprite after you change sprite number) or when you run the game?

Slasher

I change sprite in editor and can see change but when i run it i still see the old sprite maybe 60% of the time...

Crimson Wizard

Quote from: Slasher on Wed 06/02/2019 13:57:47
I change sprite in editor and can see change but when i run it i still see the old sprite maybe 60% of the time...

Sounds like either rooms are not getting saved, or not packed into the game data when you run. (I don't remember if they are read directly from project folder when testing game in the editor)

JackAnimated

Quote from: Crimson Wizard on Wed 06/02/2019 13:49:43
Quote from: JackAnimated on Wed 06/02/2019 13:26:12
I'm making a game with 1920 x 1080 resolution. Its displaying full size in the room preview window.
Is there a way I can preview it at 75% or 50% for easier viewing?

Zoom out was not supported earlier unfortunately (games of that high resolution are not very commonly made with AGS), but as Khris mentioned this is implemented in new wip version of AGS (3.5.0), as well as support for larger resource files and number of assets.


Ah cool. So I'm right at the start of the development of my project. Is this version stable to develop the whole project with?

Crimson Wizard

#11
Quote from: JackAnimated on Wed 06/02/2019 14:22:58
Ah cool. So I'm right at the start of the development of my project. Is this version stable to develop the whole project with?

Maybe  :=

Well, its in active development and we try fix reported bugs fast.

JackAnimated

Quote from: Crimson Wizard on Wed 06/02/2019 14:57:37
Quote from: JackAnimated on Wed 06/02/2019 14:22:58
Ah cool. So I'm right at the start of the development of my project. Is this version stable to develop the whole project with?

Maybe  :=

Well, its in active development and we try fix reported bugs fast.

ok cool. think I'll risk it ;)

JackAnimated

#13
Next issue:

Getting an "undefined symbol "GetHotspotAt"" error when I put this code in the Global Script:

Code: ags
if (GetHotspotAt(mouse.x,mouse.y)==1) {
SetMouseCursor(10);
} else {
SetDefaultCursor();
}




morganw

Unless you switch compatibility modes, the old scripting commands are not available. The manual is the place to check, but you need:
Code: ags
Hotspot.GetAtScreenXY

JackAnimated

That's what I get for searching decade old posts.

Thanks for the correction. It wasn't the only out of date term I was using. Here's the working solution for reference:

Code: ags
Hotspot*h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
if (h == hotspot[1]) {  
Mouse.UseModeGraphic(10);
} else {
Mouse.UseDefaultGraphic();
}

SMF spam blocked by CleanTalk