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

#1
Hello,

I am so sorry it took me so long to answer.

I used your script and it's perfectly working so now i know how to do it (a click + a condition) and it's going to be really useful.

Thanks also for the explanation about unlocking views.

Once again thanks a lot for your precious help.
#2
Hello,

I am still working on my piano bar room and unfortunately i am stuck again.

I want the character to be able to sit on a chair and just listening to the pianist with a idle view
view 167= the character sitting on the chair
Code: ags
function ochair_Interact()
{
cChar1.Walk(1420, 820, eBlock);
cChar1.FaceDirection(eDirectionUp);
cChar1.LockView(167);
}
I had this code but i think the lockwiew was preventing the idle view to animate so i made a timer that triggers the idle view.

Code: ags
function ochair_Interact()
{
cChar1.Walk(1420, 820, eBlock);
cChar1.FaceDirection(eDirectionUp);
SetTimer(7,80 + Random(500));
cChar1.LockView(167);
}

Code: ags
function room_RepExec()
{
if (IsTimerExpired(7)) 
{
cChar1.Animate(0, 5, 0, eBlock, eForwards);
SetTimer(7,80 + Random(500));
}
}
It works well maybe there was an esier way to do this ?

Now i want that when the player click somewhere it makes the character stand up and go back to the normal view

I don't know how to do that i had a look at: "on mouse click" but i am not doing anything good i tried that:
Code: ags
on_mouse_click
{
cChar1.UnlockView();
cChar1.LockView(1)
}
It gives me an error and i don't really know where to put it

Thanks again for your precious help.
#3
Quote from: Crimson Wizard on Thu 13/04/2023 23:03:52
Quote from: actaria on Thu 13/04/2023 22:34:37Perfectly working thank you didn"t know about the "always" thing

There's some information about these, and explains the difference:
https://adventuregamestudio.github.io/ags-manual/RepExec.html

Thank you
#4
Thanks a lot for the answer i will have a look right now  ;-D

EDIT:
Perfectly working thank you didn"t know about the "always" thing
#5
Hello,

I hope everyone is doing well.

I need your help because i am stuck on that one.

I have a bar with a pianist and a dancer:



I use this code to make the dancer move everywhere on stage

 
Code: ags
function room_AfterFadeIn()
{
SetTimer(15,250);
}


 
Code: ags
function room_RepExec()
{
if (IsTimerExpired(15)) {
cdanseuse.Walk(Random(999), Random(999), eNoBlock, eWalkableAreas);
SetTimer(15,80 + Random(80));
}

It works well the problem i'd like to solve is that the character needs to talk to a NPC and when the dancer reach the end of timer she stops once the NPC is talking or opening a dialog.

How can i make the dancer to keep dancing even when the player is talking to someone ?

Thanks a lot for your precious help.
#6
Hello Cassiebsg,

Stupid girl i am...
Without having my code you found my mistake.
I was not even using the correct character name but another one that is almost the same.
Thanks a lot  it's been 2 days and i was not even able to see this.

Plus i tried for hours some WalkableArea wondering why my character was not able to go through the way and it was an invisble part of the PNC blocking the way
i just needed a solid=false.

I guess this is how we learn :)

Thanks again you saved me many hours.
#7
Hello Khris,

Thanks for the reply,

This is so much better than the way i was doing to update the GUI.

Same thing for the way you check the quantity given to the NPC

I will keep this script and use it again on another room to be used to count and update GUI the right way.

Everything is working great now the only remaining problem is that the NPC isn't using is Speech and color wiew.

The color is white when he talks (supposed to be green) and the speech animation isn't playing in Global Script when it's working normally in Room Script.

I tried:

cNPC.SpeechView = 61; but it still not animating or changing the text color

I guess it might be another setting set to white somewhere else.

Any idea ?

Thanks so much once again to help me progress with AGS.
#8
Hello,

I have some problems with a script part in Global Script
It's a usual code i really don't know what i am doing wrong.

The Character needs to get 10 rocks with a pickaxe then give them to a NPC
I also have a GUI that counts the number of rocks top right of the screen

Code: ags
function NPC_UseInv()
{
if (rock10==true)
{
  if (cChar1.ActiveInventory == irock)
  {
    grock10.Visible=false;
    player.LoseInventory(irock); 
    cChar1.Walk(1274, 665, eBlock);
    cChar1.FaceDirection(eDirectionUp);
    cbianca.Say("congrats you made it");   
  }
}

The end of the code i use to show the number of rock GUI
Code: ags
function room_RepExec()
{
if (rocks == 10)
 {
 grock9.Visible=false;
 grock10.Visible=true;
 SetTimer(1,0);
 rock10=true;
 player.LoseInventory(ipickaxe); 
 }
}
I have 3 problems yes that a lot :)
-the GUI stay on screen
-Player is not losing rocks from his inventory
-NPC is not using speech view anymore (it's working in the room script) means no animation and the speech color is white when supposed to be green.

I also use a simple code to randomize if the player get a rock or not but i don't think it's related to the problem.

What am i doing wrong ?
Thanks a lot for your precious help

EDIT:
I removed all the part from the function room_RepExec() and now it's in each hotspot area where the player use the pickaxe it was a big mistake i think.
Now the GUI is being removed as intended, other problems remain the same

EDIT 2:
Ok my code was a toal mess

I was adding a new rock each time in my inventory so i had to click 10 times on ths NPC to see the rock disapear from the inventory.
GUI is also removing well now that it is not on RepExec anymore

I'll see now for the speech color
#9
I just had a look and this is really nice especially the zoom exemple with respected ratio.
i will use it sooon for sure  :-D
Great job thanks.
#10
O yes ok thank you for the explanation and it's easier than numbers sure thing.
#11
I am now trying to use the module

Code: ags
function room_RepExec()
{ 
if (PPColliding.CWithC(character[0], character[15])) {
cChar1.Say("i am dead");
  }
}

Unfortunately it's not working nothing happens when i collide.
I triple checked the characters ID's.
Both characters got solid properties On

What am I doing wrong, any ideas ?

Thank you.
#12
It's working well with script compatibility level 3.5.0 Alpha but not with 3.5.1 i think because of:
GetViewport

#13
Quote from: Crimson Wizard on Thu 01/12/2022 17:38:57
Quote from: actaria on Thu 01/12/2022 16:54:12Do i simply have to copy the ".scm" file to my Adventure game studio directory ?

You need to right click on "Scripts" and select "Import script module", then choose the scm file. The scm file may be anywhere. The Editor will unpack scm into the script files and add to your project.

Because the module is so old, there may be problems with it running in the contemporary version right away. In this case you'll have to adjust some settings in "General Settings - Backwards Compatibility", but I cannot tell which without trying the module first.


Hello,

Now i will be busy with all that this is perfect  :-D
Let's try to use my 1st module and i will try many backwards compatibilty settings in case it's not working well.

Thanks again Crimson Wizard
#14
Do you also have the documentation ?

I tried to lauch the demo but it's not working maybe because of my AGS version 3.5.1

This is the first time i use a module because i am not satisfied with:
Character.IsCollidingWithChar and AreThingsOverlapping

Do i simply have to copy the ".scm" file to my Adventure game studio directory ?

Thank you
#15
Looks like this one is still up:
Quote from: Mehrdad on Mon 20/06/2016 07:59:45Here you are:
https://www.dropbox.com/s/kn03yyfbzpucosm/PPCollision.zip?dl=0
 

This is really kind heltenjon thanks a lot  :-D
#16
 Hello,

Does anyone have a working link to download the module and the documentation please ?

I would like to try it.

Thanks a lot.
#17
Quote from: Khris on Thu 01/12/2022 11:12:18I've edited my post above accordingly. :)

Thank you Khris i will change my code then to do things the right way  :-D
#18
Quote from: Crimson Wizard on Thu 01/12/2022 02:25:09
Quote from: actaria on Thu 01/12/2022 00:29:32I don't know maybe this is just me  :-D
I managed to do the scrolling thing after a few times reading it so the manual is good.
I just though that i had to create a new camera to do the scrolling.

I just checked it, and the example makes no sense. At the same time there's no example of a proper simple scrolling (for example, for SetAt article).


True this is exactly what i was thinking wihle i was reading the manual i wanted a proper example of a simple scrolling like the one i used

This would be nice if you can write a simple scrolling example from top to bottom or from left to right and how to change the scrolling speed.

Thanks again for all the things you are doing to make AGS even better.
#19
Quote from: Crimson Wizard on Thu 01/12/2022 00:01:44
Quote from: actaria on Wed 30/11/2022 23:27:39This is the first time i use Camera functions so i copy paste the manual

I guess this means that the example in the manual is misleading, I will try to change it.

I don't know maybe this is just me  :-D
I managed to do the scrolling thing after a few times reading it so the manual is good.
I just though that i had to create a new camera to do the scrolling.
#20
Hello Crimson Wizard,

This is the first time i use Camera functions so i copy paste the manual  :-D

It's good to know that i can use the main camera to get the exact same result.

I will try this soon since i have another room where i will need the camera.

So i have to test this and also:

function on_mouse_click(MouseButton button) {
  if (player.View == DEATH) ClaimEvent();
}

that you told me for my player deaths, she will die soon again no worries

Thank you.
SMF spam blocked by CleanTalk