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

#1
Tnks! It was so simple that I don't know why I didn't tnk of it myself.
#2
Im using mostly 96x96 sprites. Can anyone suggest any sites with a collection of downloadable sprites? I'm looking for character and monster sprites with full animation bitmaps. By full animation, i don't mean little video animations. I just mean pics that when linked togeather in AGS will form a uninturpted animation. I could also really use building bitmaps as well. Any suggestions would be apprceated.
#3
The following is my setup for battles using global int.

Code: ags
  SetGlobalInt(1, 50); //Health 
  SetGlobalInt(2, 0); //Mana
  SetGlobalInt(3, 0); //Exp
  SetGlobalInt(4, 1); //Level
  SetGlobalInt(5, 100); //Town gaurd 1 health.
  SetGlobalInt(6, 15); //Charcater attack
  SetGlobalInt(7, 20); //Town gaurd 1 attack


This is how I set up a GUI to show your health. I did the same with the opponets.

Code: ags
function Health1_OnClick(GUIControl *control, MouseButton button)
{
  Display("You have %d HP remaining",GetGlobalInt(1));
}


My question is, how do I subtract the value of int 7 from int 1? like wise with int 6 from int 5.
Is there a line of script to take the value of one int from another? The only thing I can come up with is this:

Code: ags
  SetGlobalInt(1, GetGlobalInt(1)-20); //Deals atk damage from opponets attack.


While I already know that will work, It will take alot of typing in the long run. Is there another way?
#4
I'm not sure if this would be a basic scripting question, but here goes.
In the dynamic help when i looked up info on global int, it said they were obsoulete and I should consider  global vairables instead. Problem is, I tell well enough how to use them, but doesn't go into great detail on how to 'create' them, nor does it give an example line of script on thier creation; only on thier use. Any help?
#5
Okay, thanks.
#6
That worked! I changed it to the word test and is went through. Now i just nedd to ask if I can put multiple Else if statments.

If //something
else if //do this
else if //do this
else if //do this
else //do this

Is this how i'd plan what would happen when i use higher than random(2)?
#7
Does that mean that I need to create the outcome for each possibility? I would like for it to say something like "you missed" on all but 1 or 2 outcomes, and both of those would score a hit, would notify you, and would deal the damage using global int.
I haven't named anything even remotely close to "run" if thats what u meant. I name things Like oBed1, oBed2, and so on, but nothing is close to one of the command lines like Random.

If I can't use random, is there anyway to use Global int to acheive the same function?
#8
I did place it inside a function. this is what I have im my globalscript.

function Defend1_OnClick(GUIControl *control, MouseButton button)
{
  Random(2);
}

I can't add the "int" before the word random nore anything after it. If I do when I hit F5 it calls it an error. Each time I try to type the word "Run" in the line "(run==0)" the game gives me the option to use the line Random. If I just ignore it an click the = sign, it completes the word anyway. If i simply paste the code on there it errors out.
#9
I am making a battle system for my game and i plan to use the random function to decided weather of not stepping on a hotspot will trigger a battle and transport to another room. I also want to use in a GUI I made so if you press the attack button there is a random chance that you will score a hit; likewise with defense. My problem is, all I can find in the manual and what little I can find in the forums say to use scripts like

int ran=Random(2);
if (ran==0) cEgo.ChangeRoom(1);
else if (ran==1) cEgo.ChangeRoom(2);
else cEgo.ChangeRoom(3);

Problem with that is the scripting "(ran==0) errors out. "ran" is not acceptable, nor will the statement work with out it. Can anyone help? I'm using AGS version 3.1.2
#10
I have already figured out how to animate a character in the background (someone rocking in a rocking chair) but what I can't seem to figure out is how to make something move around randomly (like and animal) so that it will walk around nonstop. I can't find anything on how to do this either. Is it doable? Can anyone help with some scripting code that would do this?
#11
I am making a rpg and soon I will need some type of battle system. I have downloaded a random dice roller and I think I could combine it with some simple if, else if and if statements, but I wonder is there a way to do away with the dice roller program, and just add more scripting to occomplish the same ends.
Oh yeah, I would like a final fantasy type of battle system.
#12
Is it possible to use an inventory item on something, then have it removed from the invetory?
For example, I have an egg in my invetory, but when I have it to hatch, it wouldn't do for the creature from the egg to be there but the egg still in my inventory. Or if I use a health potion, how can I remove it from the inventory so it can't be used over and over? I have looked all over the manual, and tried a bunch of searches on this site, but I can't seem to find anything thah helps
SMF spam blocked by CleanTalk