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

#1
I have a simple question. I need to move a character from one place to somewhere but at the same time I must change the z position gradually. Because it is going to a lower place. So how can I change its z property without blocking the script, but not in an instant?

I don't want to use y instead and move it normally, because it becomes a big problem both with being wrongly in behind or on front and scaling.
#2
I am trying to make a turn based battle for my game. I had actually made one, which works for one enemy (also it included codes to work with at most 4 enemies in a sloppy way, but never tried that) but I wanted to change it so there could be friends fighting besides the player and actually working "more enemies". I looked at my messy pile of code which was written 4 months ago, which has absolutely no comments to help me remember. After reading it all over I remembered what did what but I couldn't improve it. It just doesn't support being helped, so I will just make a new and a better one. I just now tried making something but I couldn't do anything better. I usually solve my problems myself(in a long time) but I don't have enough time to just try and fail.

I don't really want to put the codes here because of their mess, length and foreign languagely named variables and functions. But I'll tell what it did and how it did. I'm not a genius at coding so I need some help improving my coding skill. I don't wish a readily written and working code, I just want to learn better ways of doing things.

In my old system; there was the player, which teleported to the fighting screen when he came close enough to a wandering enemy. The function which teleported them upon being close; labeled the enemy as "enemy1"(which was a global variable). In the room's fade in, the player and the enemy was placed on previously chosen coordinates and according to their "agility" stats, player or the enemy had the first turn. The player had three options: physical attack, magic and nothing. If player did nothing, nothing happened. If he used physical attack, he hopped and attacked the enemy. The damage was determined from player's strength stat, and a random number. Missing and critical hit chances were determined by player's perception and luck stats ,player's close combat skill and a random number. Those were the same for the enemy, too. If the player choosed magic, they saw an inventory and selected the magic they want and used it on the enemy. The damage was determined by the player's intelligence stat and the missing and critical chances by his perception, luck, magic skill and of course a random number. The player and the enemy had health, energy and cooldown bars. When the health is 0, you die. Energy was used for magic. And cooldown is the time you have to wait before attacking. Cooldown was determined by the agility. Whose cooldown becomes 0, has the turn and can attack. This was the feature which seperated the system from absolute turn based fights. At the end of a match, the player gained experience which is collected to level up and then each level he gained points to increase his stats and skills.

Now, what I need help with is having a friend with the player and having more possible enemies. I hate to write the code over and over again for each possibility like 1 enemy, 2 enemies, 3 enemies or 4 enemies and 2 friends, etc... I want to make a code which will work for every combination without problems but I couldn't figure how to do it. I read lots of things about things like arrays or structs, but I couldn't use them which got me to the conclusion that I couldn't actually understand those. Maybe they are just unrelated stuff I misunderstood.
I don't need much help about making things I explained, I can do them well enough. But I can't implement them to a new system with more characters.

I shall appreciate any help.
#3
Hi. I created a gui and a label on it so that the text of the label shows what happened. When something happens, the code appends a new sentence in a new line that contains information about what happened in the game, to the text. It works great at first, but when something like eight or nine lines are appended, the label becomes full and those lines stay there. I don't know if more text is written under, because the gui and the label is at the bottom of the screen. I want the first line to be removed when a new thing happens so other lines move to the top and the new sentence is written at the bottom. If possible, I can use another way so that the window will expand with the lines created and the player will be able to scroll up with a button to see the old notifications. I searched both the manual and the forums but I couldn't find anything useful. I would appreciate any help.
#4
--- alright I don't know how but I managed to solve it... after a minute I wrote this. And I had tried to solve this for days before posting..... I also can't see any delete button so this post will stay here aimlessly ---


Hi everyone.
I want to play a music in some rooms but if the music is playing before getting in the room, I don't want it to start over; instead I want it to keep playing. In the last version of AGS we were able to select room musics and it used to automaticly play room music if it wasn't playing and continue playing if it was playing. Now we don't have that property so I tried to write "xx.play();" in the room's load function, however, it played from start either if it was playing or not.

After that I tried coding, but I couldn't make it. I tried things like using if with "null" or "false", vs.

For now I use this as a workaraound but it is not perfect really:
Code: ags

function room_Load()
{
  bluestone=aBlueStone_Cave.Play();
}

This is in the room which player starts.

Code: ags

function room_Load()
{
    if(bluestone.IsPlaying==false){ 
    bluestone=aBlueStone_Cave.Play();}
}

And this is in the other rooms with the same music. This works for now except when I go back to that first room, the music starts from beginning as expected. Also I didn't try to use another music in the game yet, so I don't know if it would cause any touble.


I beleive the problem has a simple solution because this is a basic need of a game. So I post this in the beginners forum. By the way, I read everything in the manual that is about audios, musics and sounds. I'm not saying I understood them all, though...
#5
Hi. I tried anything I could to get the width and height of a room which is not the "current room"(so this means the player is not in that room), but I couldn't. Isn't there a way?

"room[1]" or "room(1)" doesn't work and I don't know what else I can do.
#6
Well I'm not a really beginner in AGS but I think this could be kind of a beginner's question. If it's not, I'm sorry :-\.

I wanted to use a custom gui for displaying dialog options and created a gui. I drew a background image for it and tried it. The dialog options were at the right place but there was something like this:

And then when I go over that "second" or "upper" gui with mouse, it disappears like this:


Then I thought I should use text window GUI for it and tried that. It was nice with the borders and all but there was just no way to put that text window gui to another place from the middle of the screen. After that I searched about this in the forum(also I searched the manual before, too) but all I read was the similar things that is not about my problem. So I opened this topic. Please help me if you can.

Also I think that something should be done with the borders of the gui because it works much different with text window gui(which you have to set the images of all the corners and sides one by one). In normal gui, there is nothing like that so I just use a background image and it is normal not to work properly because the dialog option gui can't have a proper width and height. The manual doesn't explain how to make the gui, if it has to be a special way.

I read there are some ways to make a custom dialog options thing but I'm not good enough at programming to understand and make it  :-[
#7
I wish I'm writing to the right forum because this is kind of a problem that I couldn't solve myself(I usually solve these kind of issues easily) but maybe for someone it's only a beginner's problem.

I want to use lip sync for one character in my game (which is my head in fact) but not the others. However when I use lip-sync it tries to use for every character and they look strange while speaking because I made the sprites like they should be looped in order. So can I make only one character use lip-sync while others use normal loops? And if yes, how?
#8
While I play my game, there seems to be no problem. But when you click the "?" signed button on the icon bar, suddenly an error occurs. It says this:
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0043FBE7 ; program pointer is +379, ACI version 3.12.1074, gtags (97,1)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

Also its all clicking script is this: " gPanel.Visible=true;
                                                   gIconbar.Visible=false;
                                                   mouse.UseModeGraphic(eModePointer);" I tried to remove something from there to find out where is the problem and I found that the problem is in the first code(gPanel.Visible=true;). I don't know what is the problem with Panel gui.
What can I do? Please help me.

I also uploaded the crash info file: http://ul.to/befrlw
#9
When we say Quitgame(1), it asks player if they are sure about quitting but it asks in english. I made every writing in my language but I couldn't change that. My friends asked me why it is in English (they all know english in fact but I just want to do my game in my language. when that window is written in English it looks strange) Can I change it? and if i can, how can i change it? Also if this question should be posted in beginners forum i'm sorry but i thought this is advanced enough not to be a beginner's problem.
edit: I now thought a solution. I could make a new gui and use it. I will now try
edit2: Allright it works. that's the best way (it worked a long time ago but my internet was gone)
#10
While I was working on my game project my computer suddenly turned off (it is doing this sometimes since last week). when I opened the computer and tried to open my game on AGS, an error occured. it said "if you can't solve it post to technical forum" so I did now. also when I looked at the forum, I saw this topic: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=39618.0 and read it; but it didn't help. here is the error's screenshot:

(some words are in my language: "kök öğesi eksik" means something like "root component is missing" and "konum:" means "place:")
please help me if you can
SMF spam blocked by CleanTalk