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

#1
It's me, again, bothering you with a silly question.
I'm making a first person game, and took the advice(which is actually very useful) from another post that one should use only 1 type of cursor.
I have the following code :

Code: ags

function room_AfterFadeIn() {
  Wait(30);
  gBlack1.Visible = false;
  Wait(30);
  gBlack2.Visible =false;
  mouse.UseModeGraphic(eModeInteract);
  Mouse.Mode = eModeInteract;
  mouse.Visible = true;
}



Because I want the cursor to appear after the fade-in. so far so good !

I added the following code to the hotspot, advice taken from some forum post


Code: ags
function hHotspot1_MouseMove()
{
mouse.SaveCursorUntilItLeaves();  
mouse.ChangeModeGraphic(mouse.Mode, 24);
}


The thing is, after moving back the cursor from the hotspot, the same 'changed' graphic persists, not reverting back to its original graphic that I selected(and that it was present before hovering to the hotspot). In the documentation it is written to put the 'savecursoruntillitleaves' think BEFORE the changing - which I did - to actually prevent that from happening. I tried to add the

 "  Mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModeInteract); 

"
into the global script, but that does not seem to work. also, others 'update' functions relating to the mouse when put into the "global script" again do not work =(.

Can you please provide a more correct code or point me out in the direction of what I'm doing wrong, please ?
#2
Hello again!
I've encountered the following difficulty:
While working on a first person game(using a blank template for the sake of learning the engine as a whole), I want to be able to trigger text that will be somewhere at the bottom of the screen. The problem is, while I can do that using the Display Text function, the game pauses, freezing all the animations that happen(and are necessary) in the background.
My question is : how can I actually print text on to the screen, so that it may be at the bottom of the screen, thus not 'pausing'the game? I thought about making an invisible character that would be positioned somewhere in the mid-bottom, but I am sure there is another way that is more efficent. Thanks in advance and I hope that someone can help me. :(
#3
Hello !
This is my second day of using AGS.
I'm working on some game, so far - so good, I'm reading the documentation and I got a 'hang of it' - managed to do my first animation in the engine etc.
But I encountered a problem, which I think, in it's essence, might be simple, but I honestly lack the understanding as how to do it.

The idea : I want to make my own 'fade in' as in an object that is completely black, that decreases its transparancey over time so that it reaches 100(invisible); The question that I'm about to ask has to do with my stupid way of implementing it so that it does not work. Anyways, this question will also help me in the future regarding object transition of transparency and so on. I think I got lost a bit in the detail.

THE PROBLEM :
Whenever I'm trying to use the provided documentation regarding transparency
Code: ags
int trans = object[0].Transparency;
while (trans < 100) {
    trans++;
    object[0].Transparency = trans;
    Wait(1);
}

I get the error that after the "= of trans" the 'engine' expects an integer value.

What I did, so far, to test, was this

Code: ags
function room_Load() {
oBlack1.Transparency = 0; //Visible
}
if I try to put it in the room_Load stuff, it would not work, so I followed this example provided here:
Code: ags
function room_Load() {
  object[?].Transparency = 100; // Make full screen Object invisible.
}
followed by

Code: ags

// BEGIN FADING IN FULL SCREEN OBJECT SCRIPT.
        //-------------------------------------------
        int trans = object[?].Transparency; // Fade in the full screen Object until it is visible. 
        while (trans > 0) {
        trans--;
        object[?].Transparency = trans;
        Wait(1);
        }
        // END OF FADE IN SCRIPT.
        //-----------------------




Following this example step by step, replacing the object[?] - with my case, oBlack1 etc, does not work and always gives an unexpected 'while' or the engine crashes.
What am I doing wrong ? Could someone shed light as what I am missing ?

Thanks in advance and I really hope im not wasting your time !
SMF spam blocked by CleanTalk