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

#1
Snarky, great one, works nicely as I tested. Do you have the project itself? You uploaded the compiled game only. Can you upload the project with all the AGS files? I promise I won't steal graphics and such.
Thanks.
#2
The clock looks more like a stopwatch, increasing gamespeed only makes it faster. And I haven't modified the code you provided, I put it as it was.
#3
Uh, I don't really understand it, care to clarify?
#4
Well, it worked, but minutes seem a bit too fast. How can I make so 40/60 cycles equal to one game minute?
Thanks again.
#5
It doesn't compile even if I use the function provided by the event
It gives: "Undefined Token 'runGameTime'"

Also, how do I use the function label.text?
Tried putting it alone, but no dice.
Is there some readable material about it? AGS manual isn't explaining enough about it.
#6
No luck in making labels work.
Snarky: If I put the room_FirstLoad function in the script, it doesn't compile.
#7
Snarky, I just really need to get the logic(script) correct, because having it done, I can use it as a base and then insert the graphics and such.
Now, how would I do about showing the variables on the screen?
For example, in the demo game, the score variable is put as @SCORETEXT@ on a gui label, can I do something like with day, hour, minute and season? How would I do that?
I couldn't find anything about that on the manual. Thanks.
#8
I guess the DateTime function would work better then, since cycles aren't always correct. And also, I would have to fix the gamespeed to 60 FPS and remove the speed modifier(I know how to do that), because AGS runs at 40 FPS(40 cycles per second). As I could get, the DateTime function isn't affected by the gamespeed, is it?

I'm asking this so I could get the time system done and do a intensive test to see if it would work for me before I insert the characters. It would be hard to know after the game is almost complete that the time system may not be working the way I would like it to.

So, is the DateTime function affected by how the gamespeed is adjusted or it relies solely on the PC's RealTime Clock?
Thank you.
#9
Well, as I planned, a virtual year would be 120 game days(like Harvest Moon)(30 game days per season[month]).
The use of all this would be a kind of hotel-management game, and to do so, I planned to use the Harvest Moon/Grand Theft Auto time method(1 real minute=1 virtual hour), so a virtual day(24 virtual hours) would be 24 real minutes.
The method for Night would just be a darker background(image).
I plan to use a four background method(morning, day, dusk(almost night) and night).
Asked about seasons because I would need to reflect the background changes for each season, but each room can only have 5 backgrounds. Now I've been thinking and I have a method for season backgrounds.
If you could explain about working with game cycles. (Example: 60 game cycles=one real second=one game minute) And how I can make the cycle start only when the game has really started(in the first playable room).
Thanks again.
#10
Hey everyone. I've come here because I have a few questions, which, by fiddling with the engine I couldn't get a way to do.
First: Is there a way to do Day-Night cycle, with the time going on second by second(1 real second=1 virtual minute) and showing it on a GUI, along with Day number?

Second: With the Day-Night Cycle, I want to do a season-based game(does anyone remember Harvest Moon?) with seasons like Spring/Summer/Fall/Winter.

Third: Along with Seasons, I would also like to have Random Events, such as Rain, extremely cold days and nights, Snowstorms, Heatwaves(extremely hot days).

Thanks, and excuse me if this is basic knowledge.
#11
Better not mess with that yet then. Thanks.
#12
QuoteTo elaborate a bit, if we speak about rooms, characters and other in-game objects supported by AGS, it is possible only to make a new extended version which will fully replace older one. In such case, all saved games will become incompatible. AGS cannot update saved games to match new game version. Also you'll have to distribute an extended version as a full game, not just an extended part. That's because at the moment AGS itself can't split the game data into modules, it requires a seamless compilation.
As you're saying, save files become corrupt when the game is updated? That's would leave the players pissed off, lol.

QuoteThere's an exception, however: digital audio and voice pack can be distributed separately. A new, or updated digital audio package may be replaced freely in game folder (you may check how this works if you copy audio.vox or music.vox from one game to another). Voice package may be added as well, if you have provided placeholders for speech in your game's dialogs.
Well, I don't plan to make it have voices, but external audio resources would already be good, thanks.

QuoteNow, there's a way to actually make unlockable content, that is a content which exists in game from the very beginning, but becomes unlocked after you place some file into game folder (or change existing file). For example, when game is started, you open and read some "game.dat" binary file. If some "magic" code found inside, you make changes to the game in script, like setting global variables, toggling object/character visibility, and so forth.
Code inside a .dat file? Well, that would create a illusion that the game has downloadable content. Not quite what I really want.


QuoteFinally, it is possible to construct a game in a modular way, in certain cases. Like Babar mentioned, if your game reads levels, or similar data, from files on disk, you may easily extend your game by adding more data files. But in such case you will need to do everything manually (read, parse data), and this way also requires manual handling of game object data (practically building an engine inside an engine).
Modularisation? Any reading sources about that? Also, can't modularisation be done with characters, inventory items or rooms?

Well, I plan to make a open-ended game, one that follows a story, but when you get to the end of the story, there will be more to play(refer to RDR and GTA).

Anyway, thanks for replying to my question. I'm still in planning stage on my game, haven't started work on it yet.
#13
Is it possible to make a game that has extra downloadable content in AGS?
Example: I make a game and release it, then, I want to do a character and room pack with, let's say, 5 characters and 5 rooms(modifying some rooms to add these new areas). How could I do to distribute only the modified files?
Which files do I need to use for each content?
Thanks.
#14
I did, by accident. Tried the export-import thing and it worked. So, I export in GlobalScript.asc and import in GlobalScript.ash? Now I get it, thanks.
#15
room.asc There is this:
Code: AGS

bool Light1;
function room_FirstLoad(){
Light1 = true;
}


On GlobalScript.asc, this:
Code: AGS

oLight1_Look(){
    if (Light1 = true) {
        Display("Light is on");
    }
    else if (Light1 = false)
    {
        Display("Light is off")
    }
}

But only the 'else if' message is displayed, even though the variable was set to true in room.asc. Do I have to export this variable from room.asc to GlobalScript.asc, if yes, how? If no, what should I do then?
#16
QuoteLight1 bool has to be set to 'true' by an action / event / condition before it will turn to true from false.
So, it must be set to true by an Object-Oriented(action/event) function?  I tried to do what I learned in C++, in which you create the variable before the main function(int main), set a value using the int main(or other functions), and use the variable on any function.

QuoteYou have a 'Define lights' function, how have you set this to turn Light1 to 'true'?
I applied the rule of first script(non-event/action) use(attach a value to a variable).

QuoteLooking at the light when false will show nothing as you have no condition for 'else' statement (else if Light1==false)
Do I really need an 'else if'? Normally, I don't use an 'else' unless I really need it.
Ok, I think I get it.
#17
I'm having some problems with variables. I've scripted the following:
Code: AGS

bool Light1;

function define_lights(){
    Light = true;
}

function oLight1_Look{
    if (Light1 == true){
        Display("The Light is on");
    }
}


But when I play the game and examine the light, it's doesn't show the message. If I remove the condition(if), it does show. What the heck is happening? What am I doing wrong?
Can I import the value from one function into another? They both are on the same script.
#18
Quote from: Khris on Wed 28/11/2012 22:53:14
Strictly speaking, AGS does have its own language. It's based on C++ and Java though.

For what you want, all you need to do is put this in the room's before fadein:

Code: ags
  cGirl.LockView(VIEW_NUMBER);
  cGirl.Animate(8, DELAY, eRepeat, eNoBlock);


In the untie interaction, call
Code: ags
  cGirl.UnlockView();

which will revert her frame handling to automatic standing/walking.
Neat. So, this code will keep looping? Nice. But, what if I put it AFTER fadein? Will it have any difference during the game when the player enters that room?
And just a cGirl.UnlockView(); function resets the character to the normal loops? That's really cool. Anyway, thanks to both you(Khris) and Crimson Wizard for helping me there. Thanks...
#19
Quote from: RenatoDias on Wed 28/11/2012 20:07:16I'm used to programming in C/C++.
So why would you get completely stumped by "this" and function parameters...?
There's no shame in admitting that you don't know how to program as long as you read the manual and put some effort into solving your problems on your own before posting here.
[/quote]

I know the basics of C/C++, such as loops and normal functions(if, switch...), but never went THAT deep to use function parameters like that. I know how to do a DO-WHILE loop, IF, ELSE, SWITCH and began to learn about functions. Haven't used function parameters and the "this" keyword yet, that's why I was so stumped. Also, I thought AGS had it's own little language, like GML(Game Maker).

Quote from: Khris on Wed 28/11/2012 21:25:54
It sounds like you want a character to keep animating using a certain loop, while the game continues, right?
Let's solve this straight, without delving into extender functions and whatnot.

Code: ags
function oComputer_Useinv() {
  
  if (player.ActiveInventory == iScrewdriver) {
    player.Walk(140, 120, eBlock);
    player.LockView(player.NormalView);
    player.Animate(8, 4, eRepeat, eNoBlock);
  }
}


Of course this means that as soon as this interaction was called, when the player interacts with something else, the view has to be unlocked. There are a couple of ways to tackle this, but I still don't have the faintest idea of what you're trying to achieve here.

Okay, let's a litte deeper. The text below is a bit "different", so be careful:
In my game, there will be scene like the following(read the bold line to know what I really want):
You arrive in a certain room of a ship you are in since the beggining of the game. The room is a prison, when you walk around, you see a girl, she has both her arms and legs tied, and a piece of tape on her mouth. She will be struggling, that is, "shaking" her body, trying to free herself. If you point the cursor on her, the cursor will change to a scissor, which enables the untie action. From then on(once you untie her), the girl will have her normal movement and follow you around.[...]
That "shaking" animation is what I want to loop.
#20
I understand, now I ask:
Let's say I have the following function:
Code: AGS

function fix_computer(int compfixed){
compfixed=0;
    while (compfixed==0) do{
        cEgo.Animate(8);
        }
}

On this code, Loop 8 is being used for the fixing objects(appliances) animation.
Now, how would I call this function mid-game? A "Use Inventory Item(screwdriver) on Object(computer)" can call the function? If so, I would just put fix_computer() inside the brackets on the event for that to work?
-After called, will it keep repeating if a variable keeps the same value?
PS: Sorry for the "DO" keyword, I'm used to programming in C/C++.
SMF spam blocked by CleanTalk