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

#182
Maybe i should have explained better. The object is most definately moving. It's animated before hand in the actual animation.
The code is all there is. Nothing more! The object is supposed to move to an end (which it does thru Photoshop's actual animation). But while it's moving it should began it's fading process. If that makes any sense? Now it just moves, and when it's been moved. The fade process starts shortly after which is "wrong". However the actual fade i've managed to get right with the code that is posted. It just needs some additional parameter (if possible) where the Tween just starts the process of fading earlier.
#183
Just got this module, and could not find a manual Online for it (Does not work on Github). What i'm trying to do is fade an object in or out. If anybody would be so kind. He or she could upload the Manual somewhere?

I've guessed my way half way to this
Code: ags
oRub.TweenFadeOut(0.8, eTweenSeconds, 20);



It's fading out the right speed, the problem is the actual object that it is fading is moving and should begin to fade out while it's moving.

Now the object does it's thing and then stands waiting for the fade out, and eventually it fades. Got the right fade out speed.

It just needs to happen faster, so what's the syntax i'm looking for?

Solution: This is the beginners forum so i didn't do a ENoBlock in the actual Object animation before the Tween. It was that easy! Thanks to Privateer Puddin' that got me on the right path, and for Khris for at least trying to understand what i'm doing! It's hard to explain sometimes. I feel coding is difficult to translate in text sometimes, what you want to achieve.


Code: ags
cGhost.Walk(140, 545, eBlock, eAnywhere);
object[0].SetView(43, 0);
object[0].Animate(1, 0, eRepeat, eNoBlock); //The ENoBlock here made the difference. Without it the TweenFadeout Waits for the full animation to finish.
oRub.TweenFadeOut(1.0);

#185
Keep it up! Looks fantastic buddy!  8-0
#186
Quote from: Ali on Wed 13/05/2020 13:15:47
The walkbehind allows you to draw over an area of the background and set a baseline. Sprites will appear either in front of or behind that area depending on their Y position in relation to the baseline. That area can be whatever shape you draw.

Objects, like characters are sprites with their own baseline (the bottom of the sprite, by default). You can't draw walkbehinds on sprites. So as long as the baseline of the desk object or desk walkbehind is below the character sprite, we shouldn't see their legs.when they're behind it.

If you want a sprite that is partly in front of and partly behind the same object, or walkbehind - that's more of a challenge. There are a few solutions, discussed recently in this thread: https://www.adventuregamestudio.co.uk/forums/index.php?topic=57953.0

Thanks Ali! What Matti wrote in that thread is exactly what i have thought about myself. Just separate the desk to two objects however it complicates things when it's scaling involved. But i just have to work harder i guess. Need to solve this. Cause it's a funny little animation and part of the future game! :-D
#187
Quote from: Snarky on Wed 13/05/2020 10:09:10
Yeah, walkbehinds apply to all characters, objects, etc. If you place an object on the background, and then draw a walkbehind (with a lower baseline), the walkbehind will "hide" the object. You should only draw a walkbehind when you want some part of the background to "go in front" of the interactive elements in the room.

So what is the walkbehind for the object therefor? I feel like i'm getting slightly confused sometimes with this programs features.  (laugh)
There clearly is a set baseline for object walkbehind (i guess?!) option in AGS (or it's something else?!) "BaselineOverridden".
#188
Quote from: Ali on Wed 13/05/2020 10:01:35
Quote from: Olleh19 on Wed 13/05/2020 02:33:35
So i thought, maybe i can use the desk exactly like i've done with "normal" walkbehinds for bakgrounds?. In otherwords i draw only the parts of the desk that is "hiding" the animation from showing up? Well to my surprise AGS bugs out completely. I'm sorry if it's not considered a bug, but if a object get's almost invisible in the actual game you see random parts of it, even tho you have drawn the walkbehind for it. I consider that a bug or it should say something "you can't do a walkbehind draw for an object", or something like that.

I might be misreading this, but AGS makes objects disappear when you draw walkbehinds, so I think it's pretty clear that walkbehinds only apply to the background.

No, you are not misreading. Okay, so it is not a bug? I wished it could work as a with normal bakgrounds. :(
#189
Quote from: Khris on Wed 13/05/2020 08:47:42
Why a walkbehind if the desk is already on object? Why isn't there a hole in the walkable area where the desk is so the character can't walk through it?

As far as I can tell, all you need is a desk object with its baseline set, that will take care of the character being obscured by it. Next, when the character has sat down, position them below the baseline so their visible upper body is drawn on top of the desk. That way the character can do stuff on the desktop.

Because his hands and the objects disapears on the top of the desk! The baseline can't be set any different from what i can understand. I've tried various baselines the outcome is still the same! Which is why i came up with the "normal" walkbehind idea that if i draw so that it's only walkbehinding the lowerparts of the desk (i hope this makes more sense now).

#190
What i'm trying to do is make a character go behind a desk, but that desk have an animation on it's top part aswell, the character is doing things on that desk, so when the character is not at the desk it should just stand there (as an object). So what i did is i separated the Desk so it's a single object. Then what i get is either one of the following.

1. I can make him walk into the desk (the basic walkcycle animation) and then transition into the animation that is the desk correctly(i have his legs "hidden" in the actual desk animation, not when he walks up too it ofc). So what is happening is ofc he walks thru the desk and then his legs disapear. Yes, i am aware of walkbehinds and baseline, THANK YOU! Unless there is some hidden option which i'm hoping for. :)

The problem seems to arise from this:

2. He walks up and with the baseline set at a fiting height he walks behind the desk, HOWEVER to make this happen i have to move the desk object in the PNG in pixels, but then that changes the scaling a little bit.

So i thought, maybe i can use the desk exactly like i've done with "normal" walkbehinds for bakgrounds?. In otherwords i draw only the parts of the desk that is "hiding" the animation from showing up? Well to my surprise AGS bugs out completely. I'm sorry if it's not considered a bug, but if a object get's almost invisible in the actual game you see random parts of it, even tho you have drawn the walkbehind for it. I consider that a bug or it should say something "you can't do a walkbehind draw for an object", or something like that.

So i get a semi invisible desk. It simply won't let me do the drawing!

Since it's an object, i believe that is why that is not working for me. You may ask, can't i just draw the object in to the actual bakground and problem solved?
Well i guess that could be a solution. If it wasn't for that the object should disapear later in the game!

Any ideas for a solution are VERY welcomed. Hopefully i solve it myself tommorrow, but if not any guidance might put me in the right direction. Thanks!


#191
Create two Gui Buttons and do this code. It looks nice when the other characters portrait is slightly fadedout. :)

Code: ags
function gPort_OnClick(GUI *theGui, MouseButton button) 
{
  
    if(gPort.Transparency==70 && gHoi.Transparency==0)
{
    gHoi.Transparency=70;
    gPort.Transparency=0;
    cPort.SetAsPlayer();
}


and same code for other characters, but different button/characters ofc. Probably can be done better. I'm just a n00b, but works fine for me
#192
On-Topic: Maybe you can try a ghost character that says the same things but is placed differently in the x,y does that solve things? I know i've used ghostcharacters a lot. No sprite, or rather say an "empty sprite" non-clickable character and use say bakground syntax perhaps? Messy ofc but it's worth a try maybe?

Off-topic: Game looks awesome!  :shocked: Keep it up!
#193
Or create some AGS Games! :-D

But yes, you are right. I am one of those lucky bastards that can stay at home for long periods of time without worrying about if i can pay the bills or not..But still you got to get those groceries, i suppose :shocked:
You've buckled up those tincans?  :-\
So many "we are going to die" people on my facebook, keep bumping that one up. Was so long ago i ate that kind of food, but if there's any time for it. I guess it's now! (laugh)
#194
Quote from: TheManInBoots on Thu 05/03/2020 21:43:29
Also the reason Khris that I wasn't immediately ready to post a clean script was the way you asked me.
You said, the only way you gonna help me is if I do this particular thing.
It felt more like trying to mâle me do things rater than an intention to help me.

You know, after the game stopped working, I spent several just trying to fix the problem.

You think I wouldn't take 5 minutes to clean the script?

You could've also said, that you'd be glad to help, but it would be easier for everyone to find a solution if the script was cleaner.
Instead of putting pressure on me.

So, I just so you know.

Clearly i'm not the only one drunk/on drugs on this forum. (laugh) It's a joke btw, cops please don't take me down, i dont use drugs. If you ask for help on this forum, they want the code to look at least somewhat clean. How could you not get that? Guys in here are amazing (Khris included) and you get butthurt cause he asks you for such a simple feat?! Come on man!
#195
Quote from: Matti on Thu 20/02/2020 00:39:12
You have an animation with 270+ sprites?  8-0

Quote from: Olleh19 on Wed 19/02/2020 21:03:52
it's kinda handy to avoid having to scroll down in the window and hold shift/mouse clicking

You don't need to hold down the shift key or mouse button. Just select the first sprite, then select the last sprite while pressing shift.

Yes, but it's duplicates of some frames with slight changes just to make the animation look more smooth, and also because i can't (i think?!) slowdown or speed up a animation in AGS, timing it exactly how i want that is, so i do it in with duplicated sprites instead!  :-[ (laugh)

Still would love that ctrl+a, Morganw! :D
#196
Quote from: Cassiebsg on Sat 29/02/2020 13:34:08
When you write commands inside the dialog script, you need to INDENT then with at least a space.

So try this instead:
Code: ags

@2// Dialog script file
@S  // Dialog startup entry point
 
cEgo: Hi, who are you?
Olleh: I'm a n00b AGS man. Trying to do my animations here.
cEgo: Okay, we at the AGS forum love to help such idiots as you! :D
  player.AddInventory(iCupforn00bquestionsofthecentury); // Indent this as well
  cNPC.Animation(); // Now that this is INDENT it should work. AND this should come before the stop, or it won't ever be called!
Stop



Ahhh!! Thanks a lot! ;)
#197
The irony is, i was almost (on drugs) (laugh). Damn tired, but i tried to write it "understandable". But hey, you know what? I've solved a lot of the issues!
Still think i'm doing stuff wrong, but if it works it works "i guess".

This is the problem i guess with explaining stuff on a forum and "in person". It's virtually impossible when it's so "complex" stuff going on.

I'll edit the post see if i can do it better, but don't expect any miracles! (laugh)

It's supposed to be a "joke or sarcasm", the player simply is waaaaaaaay far away from the actual NPC, which makes his sound fx,  just annoying and useless, but again. I've actually solved it. It's a miracle!! :)

So what's left is the dialog, how to make the NPC start doing his things again after the dialog. I've red about Idleview (on the forum) but i didn't get that one too work. Even tho i created it in another view.
#198
Edit: So a long subject, got a lot shorter simply cause i've solved most of my own problems, maybe i was on drugs after all!  (roll) (laugh)
Edit number 3000: I think this must be clear now. Going to rehab now, cya guys (it's a joke) :P

I can't believe i've got the animation/walk to actually work considering i am a complete novice, extreme megan00b programmingwannabe  (laugh)
However i've googled and searched the forum for information,

and i can't seem to grasp how to make the NPC go back to his route after the dialog with the player, or being stopped with cNPC.Stopmoving();

Perhaps using Ints? The information i've found on the forum does not seem to work, or i'm misunderstanding it.
Should the code be written inside the dialogs themselfs after a "stop" forexample, when obviously the dialog exits, should the code be placed there at the ends?

Example:

Code: ags
@2// Dialog script file
@S  // Dialog startup entry point

cEgo: Hi, who are you?
Olleh: I'm a n00b AGS man. Trying to do my animations here.
cEgo: Okay, we at the AGS forum love to help such idiots as you! :D
player.AddInventory(iCupforn00bquestionsofthecentury);
Stop
cNPC.Animation(); //?! doesn't work, a custom function i've made
#199
Quote from: Crimson Wizard on Fri 28/02/2020 19:58:12
Wait, so, there is a error in the editor, that causes function to not be found by clicking on "..." if the script is too long?

In my case it had absolutely nothing with length of script to do, at least i don't think so. :-[
I think you probably can recreate my problem by getting a project that uses option gui's in 3.4.1 (new template --> thumbleweed project 3.4.1 --> re-open in ags 3.5)
and there is the issue, at least it happened in my ags.

Consider this, nothing in the code for the gui's seems changed scriptwise (Maybe i am wrong, again i am a beginner, but from copy & pasting, it looked similar, script names changed somewhat, but i didn't see any code that sticked out as completely changed) from 3.4.1  template version VS the 3.5 template version.


#200
Quote from: Cassiebsg on Thu 27/02/2020 21:49:58
Funny, I have meet this problem before, but I solved it by creating a new ellipse name, and then copy pasting the code into it (either the code that was on the old function or vice versa). I have never exported or re-imported a GUI to solve this. I also assumed that something must have become corrupt or  I introduced a character somewhere that messed it up. Of course, I always solve problems by trial & error... but exporting/importing a GUI have never even occurred to me.

Haha, it's probably cause i'm not a programmer. But at least it's good to hear i'm not alone!  (laugh)
SMF spam blocked by CleanTalk