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

Topics - Olleh19

#1
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!


#2
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
#3
I have been hiting my head against the wall for a couple of hours now.
I have just finally got the AGS controller working.
I cannot get it to assign the movement buttons or the action button (Z) from my keyboard. I'm using the Keyboard Module 102.
I've only managed to do it by triggering the direct animations onto the pad itself, which is a totally dumb way of doing it, and limiting ofc. :-[
I'm thinking perhaps i need to import the scripts into the global script and then do something..I just don't know what syntax i'm looking for, at all.
The manual unfortunaly does not have a section on the basic usages of the AGS controller  :~(

Edit: I'm using isKeyPressed not On_Key_Press, maybe that's the issue?!
I mean looking at the scripts it does look like the ASCII or the eLeftArrow has been replaced with the modules own nicknames. ???
Still that don't explain why i get no action with simulate eKeyZ.  (roll). Just like always i'm misinterpreting AGS features. Hence the user description AGS n00b.

Code: ags


GlobalScript.asc

if (gamepad.GetAxis(0) < -20) 



Game.SimulateKeyPress(KeyboardMovement_KeyLeft);  //or eKeyLeftArrow, or (for action button attempts) eKeyZ or 90...Out of ideas. 










#4
I'm guessing i need to set something else, to make the room scroll only via X perhaps. Since if i let go of the

Code: ags
 
 
   Game.Camera.SetAt(5, 4);
  


in RepExec it just rearanges the room wrong again, once autotracking is enabled. It's a sidescroller so the room should eventually go downwards sorta like if you were using an elevator, but i'm guessing the scrolling has to be done manually for this entire room. So the X cordinate for when it should be able to scroll Y again is around 700. It's a very wide room. I just need to get a feel for how to work the custom cameras.

I've tried a bunch of things and none of them work. Forexample i thought i could change the x, value and have it go x++; when the player reaches and ends certain spots. But it did not work out as anticipated. (laugh)

All my scroll attempts ended up with a bump to the new cordinates looking aweful.

#5
I'm using player.Stopmoving(); that releases the frame eventually. But it's way too slow, and the players punch is stuck in the air for a second (just guessing).
Learnt that  from looking at the Keyboard Module, however it does something else too, that i can't really replicate as of yet.

Question: Which is I would like for the action button Z not to be held down, but triggered only when pushing it and released instantly after releasing the button.

How would i create such a function? This is what i use so far, it's too much code to paste here, but you  get the idea. Very basic!


IsButtonDown only works for mouse it seems..or i'm probably missing something obvious

Code: ags
if (IsKeyPressed(eKeyZ))
   
   
   
{
    
    
    
    
    

    if (cAxl.Loop==2 || cAxl.Loop==3 || cAxl.Loop==4 || cAxl.Loop==5) //RIGHT Hit

{
    


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

      cAxl.SetIdleView(5, 0);                           //This is a idle view to the RIGHT, so after he punches, he stays at the same side.                            

      cAxl.Baseline=0;
}
  


#6
General Discussion / How old is your computer?
Wed 21/10/2020 16:45:07
I'm soon (i hope) into my tenth year with my custom built computer. I'm guessing i have the first or second generation i7 Sabertooth p67, what a motherboard. All i can say...You guys would die laughing hearing that story. (i'll save the story for later see if anybody on here is just as crazy as me, keeping old machines running!). It almost crashed on me a couple of weeks ago tho,  and i was THIS close to order a new one. In fact i actually ordered one, but some parts where missing in their stock so the customer support adviced me to re-order but change out those parts, or else i had to wait for the computer for months...Turns out that made them loose a customer.  (laugh)
I started investigating more. I mean to be fair it's not the first time i've had a computer crash on me. It's been faulthy Ram Memory bluescreens, HD crashes (ntdl.dll file missing) when windows boots up (if you guys didn't know, now you know. That's motherboard failing on you, and potentially HD), and powersupply shortage, a scary light shows up and then *power off*.  (laugh) (wtf)

So anyway i just used Google and searched for the exact bluescreen error i've got all the time while booting Windows. Found out the bluescreen error i got was either Ram memory's or HD failing.
So i started doing memtest, chkdsk, etc  and it could not get past a certain point, it just keept re-setting  itself all the time. I know chkdsk "looks" like that sometimes, a part of the process, but this was not normal behaviour. Then it was kinda easy to add two and two together. Took out the HD. Went and bought a new one, it's a bit more noisy, but this had me clean up the overall Machine. First my Trusty M-Audio Delta 66, 15+ years(!). Incredible value for the money with aircompression, the graphicscard, cpu fan a little bit, didn't take it apart cause i don't have any cooler paste (i think it's called, without googling) in my home, but anyway. And here i am again up and running!

Please share your computer Stories. Maybe i'm just a nerd, but i like hearing such stuff. Especially about crashes, and how they were solved. Forexample a big misconception is that if a "usb drive" crashes the HD is damaged. Usually it's not.
It's just the usb mechanism that's faulty and the HD is fine. I've had 3 Usb drives failing on me that way. The brand i don't want to name. They've got some great stuff to that have held up for many years, let's put it that way  (laugh)
#7
This is the code i have so far. The Punches are on View 5 (Left, for Left Punch) and Right (For Right Punch).  Those are just 1 frame each, so i have been looking for a synthax for that, Loop, Character. Frame, but i can't type it out "correctly".
I also would like the punch to not punch endlessly, if i hold the button. Cause that glitches the sprite, and the sound effect like crazy. (laugh)
It should be released, so player has to press again. a second a millisecond doesn't matter, aslong as it's not continuing the punch animation if holding the key.

Code: ags
function Player_NormalPunch()
{
 if (IsKeyPressed(eKeyZ) && cAxl.FaceCharacter(cEnemy1))
  {

 cEnemy1.Baseline=170;  //To avoid getting behind when smashing, or otherway around..
cAxl.ChangeView(5);         //He has one Loop with One frame Punch on the Leftside (Left) and Rightside (Right), 
 cAxl.SetIdleView(5, 0);    //That's why i try to do a abrupt idleview change, cause i thought perhaps that will "idle" according to his current direction. Does not work, it seems.
  Wait(5);

 while (cAxl.Animating) aEmptyPunch.Play();



 cAxl.UnlockView(eStopMoving);
 cAxl.ChangeView(2);

 Player_Punched_AI_Once=1;
 cEnemy1.Baseline=0;
 
  
 
 
  }

}   
#8
Question: i've done a 4bar loop. The loop at the moment is 126bpm, it's stretchable ofc, Gamespeed is set at standard 40.

The animation frames needed for the phones sound to vibrate and end  in similar same rate and duration is 24, 0 delay on the animation setting.

However, i don't want to have the "same" phone vibration all the time, and that's why it's crucial to "think" right here.

How i wished the Moderators could get that "propagate sound" feature i've suggested in the next AGS release. Then this would have been a none issue. Being able to have a long sound, that is playing until it ends in the animation view would be great.

I did try with adding the sound in the first frame as if it was a "walking step" sound, but even if i unchecked it to repeat, and just "play once", it's still playing it over and over, which creates aweful phasing artifacts.

Thanks!

#9
Problem: I cannot produce Voice Speech sound, aExplosion.Play(); = works fine, musicchannels = works fine. Somewhere down the road something has happened, and i don't know what!


SOLUTION: I got a PM from a player of the game, that had the solution for the issue. Heltonjon said i should try to Compile game and go inte run gamesetup, activate voicepack. Why this has to be done, when it does not have to be done with the the other templates, i do not know. I've tried to Compile the other games, and the voice still works in them, There is no problem there at all with voice being played! I've never pushed a activate voicepack button there!

So it's not "really" solved in my book. But at least my biggest horror days are over for this time. Thank God! 8-0

If you run into the same problem, and the above solution do not work, try these, perhaps the enable/disabled voicepack compiling solved it along with enabling it in the setup. Who know's.

Clarification: "Use Voicepack If Available" inside the editors Default Settings DO NOT WORK the same as Compiling the game and run gamesetup and inside there chose the same option. "Use Voice If Avaiable". So if this happen to you. Try that!

Edit Again: WinSetup:
- Fixed "Use voice pak" option was reset if no speech.vox found. That might have been what caused it..


Original POST:

Edit: Tried Disabling Use Voicepack in Default Setup, compiling, re-enabling, compiling, no success..Looked around in the scripts, since i am no programmer i am clueless as what to look for, but everything looks "normal" to me, when comparing to the working basic template = Thumbleweed 9verb

Character named cElita.

Wavefile, or oggfile, named Elit1

Called in script
Code: ags
cElita.Say("&1 Testing1234");



Attempt two, not working either:

Code: ags
Game.PlayVoiceClip(cElita, 1);

It works in other new started templates, no problem. Clarification the Sound FILE works in other project, if it's named the same and i add a character with the same cElita name. Sorry, long nights of gamecreation takes it's toll on the brain, i guess.


Anybody know if there is a code in the scripts that plays a HUGE role for the voice speech to work? So i can search for it, see if it's been accidently deleted.
#10
It was by accident that i run into it. I'm guessing it has to do with my attempt at a titlescreen.
Am i missing something when i just make the Goptions.Visible=true ?

Using the Thumbleweed Template.


I'm guessing that is what makes it crash, i have tried to take away bits of the code's like tweens and such, but what's bothering me is that it crashes and blaims the repeatedly_execute: Error: Null string referenced

Edit: However it goes to repeatedly_execute in the optionsscript i believe, where it shows save synthax, that i am completely clueless about.


Edited:

The line that's hightlighted is  SaveGameSlot(customSaveData.saveSlotId, customSaveData.saveSlotString);

Code: ags
/ Remember when the game was started
function game_start()
{
  TimeCount.GameStart();
#ifdef SCRIPT_API_v3507
  ScreenWidth = Screen.Width;
  ScreenHeight = Screen.Height;
#endif
#ifndef SCRIPT_API_v3507
  ScreenWidth = System.ScreenWidth;
  ScreenHeight = System.ScreenHeight;
#endif
}

// workaround to take a savegame screenshot without the gui
function repeatedly_execute() 
{
  TimeCount.RepExec();
  if (customSaveData.save_scheduled) {
    SaveGameSlot(customSaveData.saveSlotId, customSaveData.saveSlotString);
    customSaveData.saveSlotId = 0;
    customSaveData.saveSlotString = "";       
    customSaveData.save_scheduled = false;
  } 
}


#endif

#ifndef __VERB_GUI_MODULE__ //A dependency is missing
  #error Missing module 'OptionGui'
#endif



#11
Problem: I need to add a "new language" to the template, but it's not letting me 100%

The script must have been changed, acording to another more skilled member of this forum, there is no function called when i attempt Verbs.SetActionButtons


EDIT: Looking at the documentation i could change it to German, since german use Ã...Ã,,Ö as Swedish. It's totally possible to re-draw all the sprites.
Unless someone can tell me how to add the Swedish one, which would be really nice ofc, since germans most likely would like to have it translated to their language.
Anyone?

Edit: Using the Manual you can get "almost" in Goal.  Duplicate a Language's code in various "else if" statements in the verbGui script, and change it to your new language. Then go when pushing the change language button, you add this code pretty much from the Manual, change the numbers to match your sprites, and add
in the translation file SE (for Swedish), the short of my "new language" in the template.

Code: ags
Game.ChangeTranslation("Swedish");
Verbs.VerbGuiOptions[eVerbGuiTemplateLanguage] = eLangSE;
Verbs.LocalizeActionButton(eLangSE, eGA_Open, 485, 486, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_Close, 487, 488, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_GiveTo, 489, 490, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_Push, 491, 492, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_Pull, 493, 494, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_Use, 495, 496, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_PickUp, 497, 498, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_LookAt, 499, 500, 's');
Verbs.LocalizeActionButton(eLangSE, eGA_TalkTo, 501, 502, 's');


HOWEVER, big danger here. Since something is off, you cannot take away the Language choice at startup. Simply cause then the verbs will NOT show up on screen at all, if you restart the game.

If anybody knows how to get the chosen languages verbs on screen next time you start the game (without the language selection Gui popup everytime entering the game). Please Shine in!

Or even better if anybody has the template creators contact info ask him to come into the forum and help me implement the Language into the template correctly. Cause this is just a temporary solution.
You don't want the player to have to choose language everytime they start up the game!

#12
So, i have done my first slightly unfinished (animations not in place) Demo game Max Fury, have you lovely Moderators (I'm not kissing ass here). Played the demo? I Surely hope so!  :) and finished it! Because then you will see, what i'm talking about
In that DEMO i used the view to animate A LOT of things, AND it would have been SO MUCH EASIER, if i could have choosen ONE SINGLE FRAME where the sound is placed and KEEPS PLAYING, and DO NOT CUT OFF. SO feature REQUEST is.

CUTOFF SOUND, true or FALSE. It will be a KILLER feature(!). Thank me later, you can send flower to my home, and so on so forth.

Why you may ask, ok in my game, i had to go into audacity insert SILENCE and try to LINE UP the sound so it matches "almost" with the frames, SIMPLY cause i could NOT do it any OTHER way. The frames destroys the sound! Imagine how much EASIER it could be to sync a sound if you can put it ON the specific animation SOUND, just like you do with FOOTSTEPS, forexample. But the footsteps don't get cutoff cause they are SHORT in wave length.

Feature Request number two.

WHEN using the views sound, SAY i wanted to use the SAME SOUND on ALL FRAMES. I did that in my game, when i animated HUGE typewriting letters on the Screen, and i wasn't really in the need of different typewriter sounds, i thought one sound IS ENOUGH. However now i had to on EVERY SINGLE frame click in the SAME SOUND. It would be VERY NICE to just be able to chose a frame and duplicate the sound of that particular FRAME.

SO my suggestion is something along the lines of PHOTOSHOPS feature called PROPAGATE.
PROPAGATE SOUND, default value of course is FALSE, because Photoshop clearly didn't learn that lesson, but it can have it's usages! And if the player wants the sound to be repeated in all frames then YES.

THANK YOU VERY MUCH, YOURS TRULY /OLLEH, or as my real name is Andreas. Why i'm Olleh i might explain sometime in the future  (laugh)


Edit: I've thought about this more. I KNOW that there's a code where you can have an ACTION at a "exact frame", but OKAY. Then if i want a certain sound for each frame. Imagine the codeblock if i have 300 different sprites.

Is it more clear now? I hope so!

#13
 (laugh) I'm laughing here! I thought i could just create a english translation file. But since it's the default Language it complains about having no translation.
I mean i'm gonna do a Swedish button (Already translated and done) and a English one.
#14
Well, i guess the title is a little misleading. The Manual documentation does not explain to my basic knowledge how to do that, only objects, you type in the description >p for pickup, etc. But Character has no Description so i am guessing it is possible to do within code "any click on character". So i have a character but he is acting more like an object that you eventually pickup.

Everything worked fine, until i ran into this issues where i don't want to frustrate myself when looking for bugs (or the player when he or she is playing the part).

Is it possible? I've tried the "Verbs.Removeextension (eGATalkto") but i'm not sure how the Syntax works, it's doing nothing! If it's even meant to do that! I hope.

#15
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);

#16
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!


#17
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
#18
So i tried to open my project from Ags 2.4.1 in Ags 3.5.0 (Thumbleweed Template).
And a lot of things had obviously changed, so i could not run it. I began copy pasting over scripts re-naming stuff, etc, and finally got the game running again.
However the option buttons are dead, save load, quit, default, resume.

So i went into the actual Gui-Options and clicked the elipse button and "onclick" seems active, so i go into it. To my surprise (or maybe not). It does not jump to any particular code.
And i think that is the issue.  I've run into it before.
it turns out this is exactly the problem i had before with Gui's, simply the elipse button just won't ignite it's code, no matter if you write it in manually, or not.
I wonder if it is possible to solve much more simplier then having to *open a thumbleweed template and export all guis, import into my project*


Edit: Or it's something else, but i'm quite sure i've imported the script parts that are "new" for 3.5
#19
Yeah, inside the editor when i import my gigantic sprite custom animations, i can't use ctrl+a (to select everything) and have to drag down with the mouse and select everything if i want to make changes to the sprites (which basically happens all the time  (laugh))
it also lags like crazy when selecting huge amounts of sprites for unknown reason. Even tho my setup is kinda old 9years, it's still an i7 with 8gbs of ram, i doubt it should really "lag", it's just something that can probably be fixed(?).

Edit: I haven't tried the absolut latest revision so MY BAD if this already has been fixed. Just delete the thread if that's the case. Thanks!


#20
I'm not sure the subject description is understandable enough.
Let's say i have a custom animation with 70 frames, and at frame 60 it needs to trigger another object or animation of another character/object (i'm not sure yet, depends how much effort i wanna put into this).

How would i do that in script?

Thanks!

SMF spam blocked by CleanTalk