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 - TheManInBoots

#121
With script source files you mean this?
deleted

I probably could've grouped certain things together better and looped more things to make it clearer in the script.
But all of this developed organically and I wasn't sure when I started off how it will go eventually.
#122
Why are you not surprised Cassiebsg?
#123
K, I think at that stage in the game I used only the Timer Module 0.9(https://www.adventuregamestudio.co.uk/forums/index.php?topic=55545.msg636576559#msg636576559)  and the rellax module (https://www.adventuregamestudio.co.uk/forums/index.php?topic=57489.msg636611488#msg636611488). don't know if you gotta import those scripts first?
#124
So presumably you need at least the 0.23 for it to work, you think?

Oh yeah right.
I remember I did not upload these because it takes more time.
So let's see if my auxiliary uploads get up before Stupot gets to his PC.
#125
I created it with 3.5.0.23
#126
HEy.

So for the project I wanted to submit for the February MAGS in the very last second the AGS editor completely gave up it's spirit!

On certain actions all of a sudden the mouse does not change it's mode anymore and stays on walk to mode all the time.

And then sometimes its start blending in and out...

I can't believe that this is a scripting error I made.

Also I can't remember having changed that much actually, just added animations and variables...

and it stopped working.


It happens when I for example click again quickly while the character talks during an interaction with an object.
Or during a room change.
Or while looking at an object twice in a row while standing in the same spot.

It's very peculiar.

And this seems more engine related.

I'm getting more and more intimidated to try ambitious, bigger projects with AGS...

But maybe someone has an idea what could cause this?


Here's a vid:

You can see that no matter how and where I click, the cursor does not change.
And 16 seconds into the video you see the cursor is starting to blink!?
Watch out though, it always automatically uses the mike for audio, turn the volume down ;)
https://streamable.com/ha8bm
#127
Hmm, the entire engine kind of broke down with the game.
That's kind of unfortunate.
Something is uploading right now, and takes it's time.
Maybe I can present at least something, even it won't be what I had intended to.

AGS program went shit crazy, just before the deadline, I have no idea how to fix that quickly.
I made a backup copy of the game some time ago in it's more infantile stage.
It doesn't have a lot of the cool stuff, but this way at least I made  a submission.

It's the AGS project file. not just the game.

It's all I have right now.

https://drive.google.com/drive/folders/10yA3IXunBv3JmwcGepnA7F8EX1Qi9lBI?usp=sharing
#128
Hahaha, it was a bit too insane, and too ambitious probably for one month.
You were the best delivering all those graphics!
I feel a bit dizzy from all the work, too.
#129
Yep, I wouldn't mind if anyone else was gonna improve, or post later either obviously...
#130
Hey Stupot!

Serious question,

how strict are you with the deadline?

Cause the uploading will take time and my internet's really slow and the game's quite big...
If I post the link for it tomorrow in the morning when it's uploaded will you still accept it as a valid submission?

We've been working all month till last minute ...  8-0
#131
Yeah, it's all over-complicating.

But Marcel wanted a means to have hotspot points.

I like the idea though of scanning the room for hotspots and calculating the center points, Khris.
Quote from: Khris on Sun 01/03/2020 20:05:46
Getting hotspot coordinates isn't possible because a hotspot doesn't have coordinates. It's a bunch of pixels. What you can do though is use Hotspot.GetAtRoomXY() to probe a sufficient amount of room pixels, then calculate a center based on the coordinates found. If you want to use this you should to this once when a room is loaded for the first time and store the coordinates in a suitable array.

If for example you have a room full of hotspots it might be useful.
This way you just create a custom function that uses the calculated and saved hotspot center points and all you need to write is:

Code: ags
player.Facehotspot(Hotspot[1]);


or probably rather
Code: ags
player.Facehotspot(1);


with 1 being the hotspot ID
#132
He could place a transparent dummy character at the Hotspot center, and name him hotspotcenter.
Then he can code
Code: ags
player. FaceLocation(hotspotcenter. x, hotspotcenter. y) ;


But again, none of this would be truly necessary, because he can simply write
Code: ags
player.FaceLocation(125,768,eBlock);

With 125,768 being the Hotspot center.
Simple solutions are still the best, why beat your brains out when you don't have to. And it still makes totally valid use of the FaceLocation function.
#133
Edited the previous post.
I'm only half thinking while writing this, working on something else at the moment sorry :P
#134
Oh yeah right.
The character automatically walks to those points.
Sorry.
#135
Hi Marcel,

I think you might be looking for this function:

For every hotspot you can set a walkto-x coordinate and walkto-y coordinate (You can set and change the exact coordinates in the hotspot's property panel in the room editor).
Once you set those, you can simply script:

Code: ags
 player.FaceLocation(hHotspot1.WalkToX, hHotspot1.WalkToY);



Hope that helps ;)
#136
Here is the exact code I use to demonstrate this:

I loop the rotation once with ints, once with floats:

Code: ags

// room script file

DynamicSprite* shower;
int angle=1;

function room_AfterFadeIn()
{
//first loop with ints
while(angle<360)
{ shower=DynamicSprite.CreateFromExistingSprite(723, true);
shower.Rotate(angle);
oindicator.Graphic =shower.Graphic;
oindicator.X = 438 (Game.SpriteWidth[723] - Game.SpriteWidth[shower.Graphic]) / 2;
oindicator.Y = 362-(Game.SpriteHeight[723] - Game.SpriteHeight[shower.Graphic])/2;
Wait(1);
angle  ;}  

angle=1;  

//second loop with floats
while(angle<360)
{ shower=DynamicSprite.CreateFromExistingSprite(723, true);
shower.Rotate(angle);
oindicator.Graphic =shower.Graphic;
oindicator.X = 438 FloatToInt(IntToFloat(Game.SpriteWidth[723] - Game.SpriteWidth[shower.Graphic]) / 2.00);
oindicator.Y = 362-FloatToInt(IntToFloat(Game.SpriteHeight[723] - Game.SpriteHeight[shower.Graphic])/2.00);
Wait(1);
angle  ;}
}



And here is the exact result with that script.
https://streamable.com/laijv

ints rotation are until 00:20, then starts the float rotation.
I'm out of this thread for now however.
I don't just get insulted like that.
I don't want to talk about this anymore.

Thanks
#137
Wow.
Thanks for the insult. We're done here.
#138
Well when I looped through the rotation, it was all jerky and shaky (moving around by 2,3 pixels) because of the rounding when using ints.
Adding the floats made it perfect!
So I do the way it works and looks perfectly smooth!!!
I don't care that you don't like it.
It works.
You sound very upset
#139
Oh thank god you mentioned those expressions.
It's exactly what I was looking for.
I was about to do a deep dive into trigonometry to calculate it.

Nice, so I used it and wrote after each rotation:

Code: ags

oindicator.X = 438+FloatToInt(IntToFloat(Game.SpriteWidth[723] - Game.SpriteWidth[shower.Graphic]) / 2.00);
oindicator.Y = 362-FloatToInt(IntToFloat(Game.SpriteHeight[723] - Game.SpriteHeight[shower.Graphic])/2.00);


and it's the most fluent and perfect rotation together with the floats.

Thanks
SMF spam blocked by CleanTalk