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

#1
Quote from: Khris on Tue 10/11/2020 15:20:37
In case it is not obvious (I was by no means obvious to me when I started to program): there isn't any special syntax involved here at all.
You can split that code into three lines:
Code: ags
  int destX = player.x + 20; // this is a simple expression
  int destY = player.y;
  player.Move(destX, destY);


When you do this in one line instead, the Move() command still has absolutely no idea about the  + 20 even existing. AGS will essentially do the three line version above, but internally.
The idea that the Move() syntax somehow supports or allows a "+ 20" here couldn't be further from what's actually happening.

It's the same with
Code: ags
  if (complicatedExpression && evenMoreComplicatedExpression || someTruthyIntValue) ... 


The  if construct has no idea about the contents of the parens, and it doesn't care at all. The conditional expression is evaluated, and the final result is used to determine whether the if block is entered or not.
This is one of the things I learned very late into my foray into programming, long after I started to write AGS scripts. It's absolutely crucial to understand how to build algorithms from simple building blocks though.

Thanks as always for the explanation, i will study hard! (nod)  I've seen those syntaxes before actually, but thought i couldn't use them "that way". Interesting!

Edit: oh no sorry i was thinking about this player.DestinationX, or Y
Saw now you did something different.
#2
Quote from: Khris on Tue 10/11/2020 14:48:03
You need
Code: ags
  player.Move(player.x + 20, player.y);


This is why i love AGS. The syntax sometimes are not at all very complicated.


Thanks as always.
#3
So i'm working on my little "fighting game scene" and i've run into this little problem now.
I need an Enemy or the Player to fall back after a Kick, falls to the left side or right side only, and stand up again, death animation is already done (just animated that). So i was thinking something along in theory that is "cEnemy1.Move.x++, or if getting hit from other side/player kick/Loop cEnemy1.Move.xx--;", but that synthax do not exist of course, too my knowledge. (laugh). but the ++; being instead perhaps 20px to x, or -20px if the enemy get's hit from the other side.

So i'm thinking just to animate the Z motion in photoshop of the enemy/player instead of scripting a falling curve (unless a basic function is simplistic ofc) and have the X motion be in code, only. Any code suggestions would be very helpful!


A custom function for this would be useful since it will most likely be used for a lot of animations  (laugh) Any suggestions how that would look like are very much welcomed!


#4
Quote from: VampireWombat on Mon 09/11/2020 18:31:51

Part of me still wants to create something that actually could win. And I'm not giving up on making games. I'm just not sure if it's adventure games that's my problem, AGS, Mags, or something else. I might end up trying Mags once or twice a year. And I might end up completely moving on to other game engines. All I can say for sure at this moment is that I can't do Mags again this month.

Who doesn't want to win something. I've done it before tho, not an MAGS win but something a lot bigger with hundreds of entries. Never forget that wonderful feeling :)
Maybe it's worth fighting for. I don't know. I think focus should just be on making a great game, doesn't matter what genre. I'm doing a completely different genre game in AGS atm.
#5
Quote from: VampireWombat on Mon 09/11/2020 13:52:54
Quote from: heltenjon on Mon 09/11/2020 12:07:46
It doesn't look like our esteemed Texan is interested, and now a third of the month has gone by anyway. I'll just save it for a pitch contest some time down the line. If someone else wants to participate, but need an idea, drop me a PM.  ;)
Sorry. Most of the reactions to last month's submission has made me unsure if I'm even going to ever do Mags again. I might even be to the point of no longer making adventure games or using AGS any more. But I'm definitely to the point where I'm not going to try more than a month in a row. I do wish you luck in being able to use your idea in some way, though.

Why do it? I won't do MAGS more either. It's pointless if you've already tried it and failed (like i did). It's better to take the time it takes to make a game that you are proud off.
Don't give up on AGS or games just cause you can't finish anything good in a month.
#6
Quote from: Racoon on Sun 08/11/2020 19:31:24
Hello again,

I started making a new game with the updated AGS and with many images that I import I have the problem that they look unclean (as colour runs over the lines). In my drawing program they look perfectly fine. Is the updated AGS more sensitive? I can´t remember having this problem as much with the old version. Is there anything I can do besides tidying up everything really good before importing it?

If you have many layers in Photoshop make sure ALL LAYERS have the exact same transparent colors placed at the same spots or else this can happen that you describe. It's happened too me. Just because you have a green bakground in one image, doesnt mean its there in the layer behind (it's weird i know.)
I lean towards that is the issue. Forexample if you resize the canvas you have to redraw green all BG layers with green. Even if you export only a image with "one layer" active, for unknown reason the other layers can interfere.

If it's not that, but it sounds like it. Have you tried the different import settings like top bottom left, or such? It's most likely to do with your transparent colors being off, perhaps antialiased pencils were used and that messed things up.
Make sure you have antialiasing turned off and then use the buckettool for your BG/Transparent color in the sprites!
#7
General Discussion / Re: Trumpmageddon
Sat 07/11/2020 17:26:18
Quote from: Snarky on Sat 07/11/2020 16:26:13
Right, Hillary Clinton is planning to assassinate Joe Biden so that Kamala Harris can be a puppet for Barack Obama. (roll)
(We're quickly headed towards the sort of conspiracy mongering that is banned on this forum.)

I actually wrote up a whole response, but on reflection, I think it's better not to engage.

And just as I post this, I get an update that CNN has called the election for Biden. Took a bit longer than I expected, but there it is.

As for all heated internet discussions one have learnt it's usually better to not engage. I've done the same so many times. Wrote a long response, only to decide not to post it, at all. Waste of time. All you get? Higher bloodpressure, and rarely no satisfaction of a clear argumentation win. Cause the other idiot will never lay down the battle axe and say "You've won, wow what an epic reply!". They will have some stupid comeback, almost always. Trumps wall was the dumbest. I remember how i told friends "Oh, the talk about the wall that's just bs, he talks like that to sound bad ass, he'll never do it.". Then he actually did it.  (wrong) Couldn't believe it  (laugh).
#8
Recruitment / Re: Offer Your Services!
Sat 07/11/2020 01:25:30
I'm offering an ear for music, and tips @ mixing/mastering/composing, 20+ years experience. My best take (music) on an intense RT'S classic theme (It's heavy metal, youtube link, but don't want to post it all over the thread). So it's in a spoiler  ;)

Spoiler

Also offering an eye for pixelart, some of my work you can find here, Instagram link: https://www.instagram.com/andreasblack1/:
I will soon change to that username, created one here before, but forgot the password, haha!!

Characters, BG's, help with Character Design, not animating, suggestions how to make things look better, or such. If you happen to like what i do. Give me a follow, i'm very happy whenever i get a new follower.  (laugh) Otherwise tell me to gtfo  (nod) Takes too much time, to help with animations, so can't do that. Caught up in my own shit, Sorry. (laugh)

Those other services just explained are all free of charge tho! 8-)


#9
General Discussion / Re: Trumpmageddon
Thu 05/11/2020 20:34:46
Quote from: Cassiebsg on Thu 05/11/2020 18:56:51
I have the perfect solution for you!
turn off the TV and play some free games right here in this forum.  (laugh)
It's not like we can do anything about it anyway.


Exactly, play some games. Avoid my game. Then you'll find yourself with a broken tv, and a broken computer monitor, perhaps.
(laugh) Or you'll get to laugh at the white house what happens behind closed doors. :)
I myself? I'm gonna play a Lucasarts title i've actually never played. Zakk Mckracken
#10
Hi!

I have been trying to use the Rumble feature, but i can't seem to change the values at all. Apart from raising the duration ???
Am i doing something wrong?
All i can change is the durations length but when i try to lower it. It rumbles 4ever instead. So i've deicided to use it as a neckmassage device when my neck hurts after drawing too much pixelart, kidding (laugh)
Is it a bug or am i not understanding the concept, i've tried lowering from 40 to 30 or 35 or such. Should i lower in specific values? If so please write some that you think might work.
I want "fast" short rumbles for an impact, not these 40 game loops rumbles!  (wrong)

Wished i knew what was wrong. This is the only code that works, if i change this a little either it rumbles forever. or if i raise the duration to 100 it will go for 100game loops, etc. But the other values, no

Edit: Should the gamespeed be set to 30 if i want 30 loops to work? :/ Don't want to do that, ofc.

Code: ags
if (!gamepad.IsButtonDownOnce(3))  

{
gamepad.Rumble(65636,65535,40);

}

#11
General Discussion / Re: Trumpmageddon
Thu 05/11/2020 12:19:17
I don't know if i'm alone thinking about this but Biden's age. Will he be the oldest president to ever rule the USA if he sits for 4years or even more? He will be over 80years old.
Recognise this. He might have slight dementia, or already have it cause of his old age. Same with Trump.
What is going on in the USA?
(laugh)
#12
General Discussion / Re: Trumpmageddon
Wed 04/11/2020 12:23:04
https://www.instagram.com/p/CFcCD8fpnYi/

What they both have to say about my native country. Did a while ago, thought it was fiting in this thread ;)

A Swedish professor said that Biden is mentally retarded. I died laughing, in national tv too! (laugh)

All i can think is. Let's pretend this Biden actually wins. He is so old, in fact he is very old. Even older then Trump. He could get dementia, or already have it (probably what the professor actually meant to say in Swedish tv.

I can't get my head around the fact that two Very old people are about to to run a country. are there no better alternatives? (wrong)
#13
I have a vague memory of reading about this, but i can't seem to find that thread anymore. If it ever existed.  (laugh).
The regular follow or follow exactly is not working for what i'm trying to do, so i need an offset of -20 -30 perhaps so he/she is either behind or in front of the player character.

Edit: What i mean is "followexactly" but an offset of 30 or -30
#14
This is the true answer. If you like games, look up the sprites of them. Look at the resolution of classic point & click games. Usually 320 - 240px or 320 - 200px.... (AGS standard settings).

Open your photoshop (or whatever software you use).

Insert that information into the picture size settings. Now do this. Take a Sprite from a game that you love, Lucasarts sprites are available everywhere, or Sierre spritesheets. Download from the World Wide Web!

Now copy that sprite into your drawing, LOCK it, and create a new layer and start drawing! And you have a much better change of getting the proportions correct. Great tip, huh?!

I realised it recently, kinda stupid that one never thought about it, actually. Instead of drawing something then throw it into the game and realise, shit i've drawn too big again! Which happened in my first "game" on here!

That's the way to avoid drawing too big, or too thin details in your bakgrounds. Good Luck!
#15
Quote from: PlayPretend on Tue 03/11/2020 14:13:38
Heltenjon:
Spoiler
Aw, thank you so much, your compliments mean a lot!  Everyone did a great job this month.
[close]

Spoiler
I share his thoughts. Great game! It's a winner for me. I'm voting for it too.
[close]
#16
Quote from: JSH on Tue 03/11/2020 08:23:16
Found someone!

Grattis, det görs mycket point & click i Dalarna, sägs det. Jag tror jag kan räkna till två personer. :)
Satte ju kaffet i halsen där. När jag såg dalahästen i Kathy för några år sen, och började googla intensivt. Detta måste vara det där spelhögskoleprogrammet eller något *googlar*
(laugh)

Lycka till, om du vill ha dala-feedback eller speltestare finns jag ju i närheten.
#17
Quote from: Shadow1000 on Mon 02/11/2020 18:12:06
Quote from: JackPutter on Mon 02/11/2020 13:59:19
I made a deliberate effort this time to make a multi-step puzzle that required a bit of exploring and deducing to figure out. I tried to make sure that there was at least one clear clue for every step, but since pretty much everyone who has replied here has gotten stuck at one point or another I guess I just made it too confusing. I'll be sure to refine and clarify things as much as I can before I release the game fully. I'm very happy to hear you say that you enjoyed it, even if you got stumped in the end!

My opinion is that the difficulty level was right on. I did get stuck on something and I explained what I missed. But overall the level was right for me.

Good Point, i think it's dangerous to believe there is something wrong with your game just because of a couple of guys or girls on a forum, get's stuck. I was being dumb on a lot of things. Forexample the case sensitive. Maybe other players tries that instantly. I didn't, so i got stuck for 10minutes, or more, i don't know! Does that mean all players are as dumb? ofc not. Same with my little game, not saying the players of my game are dumb, but they do not represent the entire world either. Some puzzle are easy for others, while incredible hard for other individuals. Alltho i'll be humble enough to admit my puzzle was pure evil.  (laugh) (nod)
#18
SOLVED: I've just put it in the wrong place. I was not thinking correctly i believe. I tried to run ekeyZ || gamepad but outside the function in repeately, it should ofc have been INSIDE the function Player_Actions()
Thank god!


The original problem was: The IsKeyPressed Z will NOT assign to the gamecontroller, but the solution is now added.


Problem 2 Solved: How to get Gamepad to work for a Custom scripts functions:

To get it to work in your own Custom scripts. This i did not get to work first either, it's just trial & error, but it turns out you need to pretty much "clone" the globalscript first lines. You need to add this to get the gamepad working inside the custom script:

Code: ags


//top of your custom script.asc before all other functions are introduced, just like in your globalscript...

Controller*gamepad;



function game_start()
{
    gamepad = Controller.Open(0);
}







Code: ags

//Global script.asc      


Controller*gamepad;
function game_start()
{  


//This is NOT for the custom script solution, this is a a separate solution. If you want the gamepad to work in Globalscript only and dont care about doing your Custom functions in other scripts.
                                         

  gamepad = Controller.Open(0);

cAxl.SetIdleView(2, -30);
cEnemy1.SetIdleView(3, -30); 

 Mouse.ControlEnabled=false;
 Mouse.Visible=false;
 
KeyboardMovement.SetMode(eKeyboardMovement_Pressing);


  
   // set KeyboardMovement movement mode
  

}


function Player_Actions()  //here is the function..It's declared (if that is what it's called in Globalscript.ash
{
  

  
{
 
 player.Say "(This would work if i push the Square button on my gamecontroller");
   
    cAxl.Baseline=1000;                 // This makes him hit in the face, or else the punches get's behind the enemy's Body. 
    cEnemy1.Baseline=1;                 //Try to make this based on Enemy's Y positions instead, so it calculates where it can hit and not..
 
   
   if (IsKeyPressed(eKeyZ) || gamepad.IsButtonDownOnce(3))            //PUNCH BUTTON    - Here is the solution. gamepad needed to be in the actual function NOT OUTSIDE IT in the globalscript; DOH!!! 
  
   
{
    


    if (cAxl.Loop==2 || cAxl.Loop==3 || cAxl.Loop==4 || cAxl.Loop==5) //RIGHT PUNCH HIT, All loops are RIGHT/positioned player v_Axl_WalkAction 

{
    


      cAxl.Animate (10, 0, eOnce, eNoBlock); 

      cAxl.SetIdleView(5, 0);                                                       

      cAxl.Baseline=0;
}
  


#19
Quote from: Andrea1992 on Sun 01/11/2020 04:27:08
Hi, I'm using a Lucasarts speech style. I'd like to add a sound when the player hovers over the dialogue options. Is this possible?
Thanks!

Hi, always use the Autofill function in script and look there.

If you type Dialog in a script you'll get a lot of different suggested options, then click on one of those and push F1, then the manual opens that section.
Hope you'll find what you're looking for. As for if it's possible. I don't know, i'm pretty new to AGS aswell, but using autofill function and F1 is your second best friend. Best friend (usually) is this forum if you'll get a reply.
I hope some of the more accomplished users can shine in here and help you out!

#20
Quote
Olleh19 - I'm sorry you had so much trouble with my entry! So far I have consistently gotten comments about every single one of my previous games that the puzzles were too straighforward, so I made a deliberate effort this time to make a multi-step puzzle that required a bit of exploring and deducing to figure out. I tried to make sure that there was at least one clear clue for every step, but since pretty much everyone who has replied here has gotten stuck at one point or another I guess I just made it too confusing. I'll be sure to refine and clarify things as much as I can before I release the game fully. I'm very happy to hear you say that you enjoyed it, even if you got stumped in the end!


Yeah, i hear you. That's how i thought about my puzzle too that "this is too easy, i need to make it more complicated" and what happened? Almost everyone got stuck! Haha.
SMF spam blocked by CleanTalk