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

#21
When I heard about this module I started a new game to just try it out and I can't figure out why I get this error((Failed to save room room1.crm; details below
room1.asc(5): Error (line 5): must have an instance of the struct to access a non-static member)).I have the module imported and no matter what of those commands I type I always get the same error.What am I missing?
Code: ags

function room_AfterFadeIn()
{
	Mode7.SetGroundSprite(3);
}
#22
When the mouse moves over a hotspot it should change it's cursor mode and then change back when it leaves.Sometimes this works but whenever the mouse moves to click on a gui and then is no longer over the hotspot it gets stuck in the cursor mode.
I just have a quit button(hotspot) and the basic Quitgame gui but if I click on one of the buttons the cursor is stuck in a mode after the gui closes.
Code: ags

function hHotspot1_AnyClick()
{
	QuitGame(1);
}

function hHotspot1_MouseMove()
{
	mouse.SaveCursorUntilItLeaves();
	mouse.Mode=eModeCleave;
}
 
#23
I have a few questions about using the html that is compiled using ags 3.6.0.
1:When I open the html file of the compiled files why does it never load.
2:Does opening the html game require internet.I don't know if it uses an online emulator or something.
3:If the game was multiplayer could it be run as one game but be accessed by many people and show the others using it.By that I mean that it would show others playing it too.Perhaps this should be in advanced technical forums.
I think that's about all the questions I need answered for now.
#24
I don't know if I've asked this before or not but whatever the case it still isn't solved.If I could make a condition that if the character changes the room I could save much time.Is there a way to have something like.
if(player.ChangeRoom==true)
{}
Now I know this doesn't work but is there anything similar that works?
#25
I have a problem with a global object giving the null pointer error.Ive used global objects before so i'm thinking it might be the way i'm using it.Maybe I did something wrong with On_Event."a" is the global object.This happens for anything having to do with the object "a".
Code: ags

function on_event(EventType event, int data)
{
  int geargraphic = Random(5);
  if(event == eEventEnterRoomBeforeFadein)
  {
    
    if(geargraphic==0)
    {
      a.Graphic=13;
    }
    if(geargraphic==1)
    {
      a.Graphic=8;
    }
    if(geargraphic==2)
    {
      a.Graphic=7;
    }  
    if(geargraphic==3)
    {
      a.Graphic=9;
    }
    if(geargraphic==4)
    {
      a.Graphic=10;
    }
    if(geargraphic==5)
    {
      a.Graphic=12;
    }
    a.X=200;
    a.Y=200;
  }
} 
#26
It would be useful to me if I could create new objects through script everytime a hotspot is clicked.
I want the name of the new hotspot to be its name plus an integer number.I have the integer adding everytime so that It would make a new object with a different name.Is it possible to add an integer to a new objects name?

Code: ags

int c2;
function hHotspot5_AnyClick()
{
  Object* pipe+c2;
  c2+=1;
}
#27
I know right know there is already a lot going into ags 3.6.0 but I was thinking maybe later add this feature.I'm not sure if it's really that useful to allow declaring events using script but someone said about it to me as being annoying to have to un-declare deleted functions.Some people don't like certain guis that much.What do you think? Is allowing declaring events through script worth it or is this already possible?
#28
I have an integer that should = player.y whenever the if statement is true.I don't know how get this to continuously check the if statement without changing the integer continuously.
Code: ags

function repeatedly_execute_always()
{
    if(stopidledirect>player.y+6)
    {
        stopidledirect=player.y;
        max.y+=5;
    }	
    if(stopidledirect<player.y-6)
    {
       stopidledirect=player.y;
       max.y-=5;
    }	
}

#29
      I want the game to read some script when the room changes or is just activating the event room_beforefadein for all rooms.
I tried using callroomscript but that doesn't seem to read.I know that I could just paste this script to all rooms but I would rather take a shortcut if possible.The reason I have it this way is because I need the script to run before fade in.
Code: ags

function game_start()
{
  
	//place character
	if(CallRoomScript(eEventEnterRoomBeforeFadein))
	{
		if(player.Room==5)
		{}
		else
		{
			player.x=960;
			player.y=1080;
		}
	}	
}

I have also tried
Code: ags
	

        if(player.ChangeRoom(player.Room, player.x, player.y))
	{
		if(player.Room==5)
		{}
		else
		{
			player.x=960;
			player.y=1080;
		}
	}	

Thanks in advance
#30
As It probably is fairly obvious my games are made for kids.And the biggest challenge for me is advertising to parents.I have been searching for websites that advertise and most of the costs I've found are way too high for my budget.$500 a month is an extremely large price for me.Maybe after I get my business going I would spend more but I'm asking anybody.If you know of some places to advertise (even expensive).A list of many places would help alot.
Thanks
#31
I need to put an integer into a label.text.I converted the integer to float but I cant seem to convert float to string.
Label4.Text=IntToFloat(player.x);
What is wrong with this?
In fact I cant seem to put anything other than string in labels. Yet I can put integers and others into player.say.
#32
    I'm normally one who sorts everything as General to Specific using folders if I can. And one annoying problem I ran into is the sprite folders.If I organize them incorrectly I cant move it to the right place. The ability to drag a sprite folder into another would be time saving.
Also being able to copy folders would help too.I know that being able to copy folders would cause a problem because of sprite numbers.I dont know how ags works but if it is possible could the copied sprites be changed to  numbers larger than the earlier number of most sprites? As in adding new sprites from the copies?
#33
     Hi. I want to be able to detect the distance in pixels from the players position.If The player is at 300 it should set the integer to 100%.And if the player is at the end of the screen then the integer would equal zero no matter what edge the players at.In simple I need the script to consider 300 to be 100%.And continuously change from player.x .All I have as an example is this {percent=pixel-300;}and I know this doesn't work.This is a lost knowledge to me so anything will probably refresh my memory.Sorry I couldn't do a better topic name.
Thanks
#34
I have an object that flies by the screen and I need to detect whether the top and bottom of its graphics are entirely on screen.
Code: ags

  if(IsKeyPressed(eKeySpace))
  {
    flash.SetView(3);
    flash.Animate(0, 5, eOnce, eBlock);
    if(eagle.Y<420||eagle.Y>540)
    {
      eagle.StopMoving();
      Display("You Lost!You couldn't get that flawlessly timed snapshot!");
    }  
    else
    {
      eagle.StopMoving();
      Display("You win this level");
    }  
  }  

Does anyone have an idea from this script or does figuring this out require seeing the game.If so here it is.https://www.mediafire.com/file/sjgxzfnjomszbwu/Get+The+Picture.7z/file
#35
I am attempting to create a very basic AI chatbot for a character.I don't know if this is possible or not but i'd like to attempt it.I know that in order to create a chatbot It has to be able to search for particular words in the input and to store unknown words in a dictionary.Then if I could get this to understand just yes,No commands I could slowly teach it words.I thought that maybe using integers and creating a file It could store words.But first I need to figure out how to let it search typed input for known words and store new words in a dictionary .

Any help with this would be appreciated.
#36
I have this script here which doesn't want to skip the audio type when a key is pressed.
Code: ags

function repeatedly_execute_always()
{
  if(IsKeyPressed(eKeyEscape))
  {
    if(Game.IsAudioPlaying(eAudioTypetalk2))
    {
      Game.StopAudio(eAudioTypetalk2);
      lblAction.Text="";
    } 
  } 
}

Could I have done something wrong with  this custom say function that messes it up?
Code: ags

function MySay(this Character*, AudioClip *talk, String text)
{
  talk.Play();
  this.SayBackground(text);
}
#37
I kind of feel a little weird saying this since I already talked to Crimson Wizard about this but I didnt know where to ask him this. I noticed some music based game ideas never happen or are just not fully functional when made in ags.
For an example of why more than 16 channels are needed. I will give a story idea.
Supposing  a  game had a virtual piano that was controlled by keyboard input for every note.
If the user was to make a chord or play too fast before the channels freed up the game would crash.
I know the reason it isnt needed that much is because many channels at once would be an incoherent mess.
but with music this is different.Notes merge through channels to create music.
I dont know if there could be any other reason than this but you know the more room for creativity could make more room for new ideas.I know that this is a bit ridiculous to think about 20 or 30 channels but im just suggesting it. Even if not to be built into ags just a module or plugin would be plenty.
This may or may not have much of a use but I leave it up to you to think about it.

         
             -Pajama Sam
 
#38
My character has a sound file play when he talks but I am attempting to make it that you can skip the talking and the text at the same time by clicking him again.

The sound and the text shows. Then when you click again it first stops the text before stopping the sound.
I'm not using the speech files I am using a new sound type called talk.

Code: ags


function max12_AnyClick()
{
  if(Game.IsAudioPlaying(eAudioTypetalk2))
  {
    Game.StopAudio(eAudioTypetalk2);
  }  
  else
  {
    aWeird.Play();
  }  
  player.Say("You mean even dummer than you!");
}


#39
Hi everyone I've got a script that's been puzzling me for months.

I am trying to play an animation then wait till its finished but wait for user control to play the second and 3rd animation.

Code: ags


  if(mouse.y>1026)
  {
    //play the animation of appearing;
    if(invitem.Animating)
    {}
    else
    {
      invitem.Animate(79, 0, 5, eOnce);
    }  
  }
  if(mouse.y<1024)
  {
    //play the animation of falling;
    if(invitem.Animating)
    {
      invitem.Animate(80, 0, 5, eOnce); 
    }
  }



I have a button in a gui that animates when the mouse moves to the bottom of the screen then animates when the mouse leaves the bottom.

It's like a custom inventory gui that has the inventory items appear then drop when you leave the bottom.

I want to have the item float up then hover and then fall back down again.

The first animation either cuts off the second or the first runs into the second before the user command.

#40
Hello Everybody
       I have a problem with this simple problem but I couldn't find it anywhere. I can't get past this "Invalid channel ID" error for all sounds imported under a new type I made. I't seemed like there would be instructions on how to make a new sound type but there isn't.   

The setting I have for the type seem altogether basic but all sounds imported under this have an invalid channel ID. Step by step instructions on this would be appreciated.
SMF spam blocked by CleanTalk