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

#1
Is there a not compicated way to make my cursor change for a second and then to comeback to my original cursor image?
my mouse is an aim and i am shooting,
I have an aim draw on the cursor and i want to add a spark when i shoot (when i press the mouse button)
ive been looking at the posts, but it gets far too complicated to the point i am now at scripting.

Any help wold be great!
Thanks!!!
#3
I have a character, with an animated view on him.
Any ideas of why i can see the animation in the selected character settings runinng fine,
but when i go to the game, the animation dont run?
The character have a waving cape y want the cape to be continuously waveing.

#4
Hi, im having a problem with my game maybe someone knows what to do in this case:

I have 3 characters, Player can change between characters anytime he wants.
So this is the problem:


MAP: side view:
roomA    roomB
(____2_)(_1____)
*() <-this are doors. doors are all closed.
*number 1 and 2 are characters

then:
*1 is in room B
*1 opens the door in order to go to room A
*player change character to character 2
*from room A the door linking the two rooms remains closed :(

since those are separated rooms i dont know what to do.
Is there a simple way to link doors in some way?
thats my problem, any help with this would be great!
thanks


The method i use to have doors opened or closed is :

when the door opens i put an object with the image of a opened door, and allow the character to change to room A

#5
Beginners' Technical Questions / Re: bool flag
Wed 13/01/2016 19:49:40
Thank you very much Khris it works great!:grin::-D
#6
Beginners' Technical Questions / bool flag
Wed 06/01/2016 06:05:31
Character Bern :grin: makes a little talk if you go to his room.
I have a phone in other room. So if the player :-D want to talk to the phone, he can.
Every time player :-D get the phone, phonecall 1 dialog plays.
But the player  :-D can only see phonecall 2 dialog, if he go to Bern's room, and listen to a character Berns talk. :grin: (The talk activates when the player enters the room)


Im trying to do that,

So to solve the problem i have tryed this:

I put this in global script:
Code: ags
bool planb = false;


When Bern :grin: do certain talk it activates a flag. So, i ve putted this code at the end of the talk:
Code: ags
bool planb = true;


Then, later in the game, when player :-D talks to the phone,
if that boolean is set to false(:grin: Bern's first talk was not seen by the player)   
if that boolean was set to true(:grin: Bern's first talk was seen by the player)   
and it activtes the phonecall 2 dialog.
This is what i want to do because i want to make sure that phonecall 2 dialog only activates if the player have seen the Bern's talk

So then ive tried this in the room containing the phone scripting:
Code: ags

if (phoneflag01 == 1 && planb = true )
        {
      player.Say("phonecall 2 dialogs");
      
        }

But it gives me this error:

Code: ags
room7.asc(184): Error (line 184): undefined symbol 'planb'




Almost the full length scripting:
Code: ags

// room script file
int phoneflag01 = 0;




This goes inside a function called on NumberClick
{

else if (telephoneNumber == ERIC_NUMBER) 
 {
 player.Say("Hello eric.");
 cEric.Say("I dont have time bye.");
 }
    
   
    else if (telephoneNumber == DELIVERY_NUMBER)
{
    if (phoneflag01 < 2) 
    {
    phoneflag01 += 1;
    }
  
         if (phoneflag01 == 0) 
         {
         player.Say(" phonecall 1 dialog, version 01.");
         }
  
  
            if (phoneflag01 == 1) 
            {
            player.Say(" phonecall 1 dialog, version 02.");
            }
 
 
               if (phoneflag01 == 2) 
               {
               player.Say(" phonecall 1 dialog, version 03.");
               }

          
      
                    if (phoneflag01 == 1 && planb = true )
                    {
                    player.Say(" phonecall 2 dialog");
                    }

                           else  
                           {
                           player.Say("tone");
                           }

}



Any help would be great!

#7
Oh, i got the player locked in a view!
I also added the back blink as Snarky said.
Its working now! thank you!.
#8
Ok so, as i dont have the sierra style i guess it wont work for me.
That left me with idleview,
Rigth now i manage to change the animation.
Without a problem in this way.
Code: ags
cAlex.LockView(26);// change to the blink view
cAlex.Animate(0, 8, eOnce, eBlock, eForwards);//the blink goes on
cAlex.LockView(10);//back to the normal view

But every time i want the player to blink y have to add 3 lines of code.
Is there any way to make the idleview in a more independant way?

I have tried using:

Code: ags

function room_Load()
{
cAlex.SetIdleView(23, 10);
}

but nothing happened.

the 23 view i call there have the character blinking animation, the front, back, and sides.
#9
Yes sorry i didnt give much direcctions,
ok so, if i put this:
Code: ags
cAlex.BlinkView = 23;
cAlex.BlinkInterval = 160;


on global script it says:

Code: ags
GlobalScript.asc(577): Error (line 577): Parse error: unexpected 'cAlex'


i supose maybe it got to be inside some function?

i put it outside of any function, now i realise it probably have to go inside one , but no idea of which one.

if i put this stuff (the same stuff)

in a room, it does not give me any errors but it dont work at all,
Ive putted it inside:
function room_Load()

i have make view of the player looking front, to the camera with two frames
one open eyed and the other with closed eyes.I have called it: VAlexBlink and its the View number 23
I suppose the :
QuotecAlex.BlinkView = 23;
would call this new view i have made, but so far no luck.
#10
Beginners' Technical Questions / Blinking view
Sun 03/01/2016 01:15:44
Im trying to make my characters blink, and blinking view seems the best way to do it.
But i dont understand it very well.

I want my characters to blink during the entire game so i suppose i put this stuff on global script,
but it gives me an error.

In the room it does not give me any error, but it dont work.


Code: ags

cAlex.BlinkView = 23;
cAlex.BlinkInterval = 160;


Also i have 3 views to change right?
the front one and the two sides.
Do I have to do something with the loops?
Any ideas?
#11
So this is the way i use:
i left it here because maybe it can help others,

out of any function:
Code: ags
bool IsVentasNotTalking = true;


ON LOAD:
Code: ags
SetTimer(1, 120);



ON REP EXEC:
Code: ags
if(IsTimerExpired(1) && IsVentasNotTalking && player.HasInventory(iVentas))
          {
          i = Random(2);
          if (i == 0) cVenta.SayBackground("Pssssst.");
          else if (i == 1) cVenta.SayBackground("Pssssssssssst!.");
          else  cVenta.SayBackground("Hey!.");
          IsVentasNotTalking = true; 
          SetTimer(1, 120);
          }


So to shut the character i give him an item.
#12
Thank you!!
#13

I keep getting this error in the mirror module, any ideas?
anything would help!

The error is in this line of the mirror2.0.asc code:
Code: ags

LabelDebug.Text = String.Format("transp=%d", c.Transparency);


this is the output message:

mirror2.0.asc(461): Error (line 461): Undefined token 'LabelDebug'
#14
It works great! thank you very much!!!
#15
Hi, im trying to make the camera move lefting the character behind to allow the player to see a landscape and then back to the character.
Rigth now i have this and it run ok on the first part, but when the camera goes back it goes back without scrolling. It jumps to the player position.
How can i make a smooth scroll back like the scrolling on the first part?

Code: ags
SetViewport(0, 134);
while (x<200) 
{
  SetViewport(x,0);
  Wait(1);
   x++; 
}
#16
Thanks, im making some loops already, thanks for all the help,
And im using both ways you told me, the tween and the normal one.

for example:

Code: ags
object[8].TweenPosition(55.5,360, 17, eEaseInOutQuadTween, eRepeatTween);
#17
Thank you Cerno, Slasher and Khris for your help, people in this forum have helped me so much with my game i cannot say enough thanks.
I somehow solved it, but its 3 am and i have no more energy to try to understand exactly how, so tomorrow or in a few days i will post the resolution.
:smiley::):smiley::):smiley::)
#18
:sad: I understand what you say, but even if i set the parameter to false, i still just see 1x1 blue pixels.
And if i set it to true, i see 1x1 black pixels) I add this because it can give some clue of what could be happening).
here is my code:
Code: ags
WeatherModule.Init(16); 
WeatherModule.Start(-1, 2, false,true,true, 0, 320, 0, 144);
WeatherModule.SetSprite(0, 2041);
WeatherModule.SetSprite(1, 2041);
WeatherModule.SetSprite(2, 2041);
WeatherModule.SetSprite(3, 2041);
WeatherModule.SetSprite(4, 2041);
WeatherModule.SetSprite(5, 2041);
WeatherModule.SetSprite(6, 2041);
WeatherModule.SetSprite(7, 2041);
WeatherModule.SetSprite(8, 2041);
WeatherModule.SetSprite(9, 2041);
WeatherModule.SetSprite(10, 2041);
WeatherModule.SetSprite(11, 2041);
WeatherModule.SetSprite(12, 2041);
WeatherModule.SetSprite(13, 2041);
WeatherModule.SetSprite(14, 2041);
WeatherModule.SetSprite(15, 2041);

Maybe other module is mixing with this module or something like that?
(Even if i change the colour parameter you said, i still get only black pixels.)
#19
It works fine unfortunately too quickly for my clouds.
I have installed the tween module but even the help file seems a bit dificult to me,

i dont know how to activate stuff, maybe is too advanced for me
any help would be great!
#20
Quote from: Cerno on Mon 21/12/2015 22:01:19
Have you tried using Character.HasInventory(InventoryItem *item) to check whether he has the item?
If yes, let him continue talking. If not, do nothing.

Could you explain me a little more?
Rigth now i have this but i have a mess in my head:

I have tryed what you both sayed to me but in the case of slasher:
i cant script all in the global because global havent got repetedly execute (at least ive tryed to use it but wont work)
and i cant script all in the room because i have a character and his scripting take me to global


using Character.HasInventory(InventoryItem *item) to check whether he has the item?
If yes, let him continue talking. If not, do nothing.
This seems to be a good idea but i cant manage to implement it.

i dont know how to make the timer to shut off or to make the char do nothing :(


So i have this:

iVentas (item)
cVenta(character who is talking)
//////////////////////////////////////////////////////



in room script:
Code: ags

int i;
bool IsVentasTalking = true; // line from the tutorial


////////////////////////////////////////////////////////////////////////

In the global script:  (here i cant put this in the room script,
because it needs to be in the global bacause is a character)



Code: ags

function cVenta_UseInv()
{
  if(player.ActiveInventory == iVentas)
  {
  player.Walk(334, 128, eBlock, eWalkableAreas);
  player.FaceLocation(330, 6, eBlock);
player.LoseInventory(iVentas);
cVenta.Say("Gracias.");

IsVentasTalking = true; // line from the tutorial

}
 
}

/////////////////////////////////////////////////////////////////
back to  room script:

Code: ags
if(IsTimerExpired(1) && IsVentasTalking)// line from the tutorial
       {
          i = Random(2);
          if (i == 0) cVenta.SayBackground("Pssssst.");
          else if (i == 1) cVenta.SayBackground("Pssssssssssst!.");
          else  cVenta.SayBackground("Hey!.");
          
      }
SMF spam blocked by CleanTalk