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

#1
I hope someone will upload it without comment like the other AGS Awards on YouTube.
#2
Will someone upload it to youtube?
#3
Please wait until connected  ???

Edit: I got it.
#4
Thank u so much. I'm very happy to see my game on the list  :-*
#5
Quote from: Crimson Wizard on Sun 03/07/2022 12:07:03
Quote from: Amir on Sun 03/07/2022 09:33:04
I have a question. As far as I remember I tried android launcher back then and it worked fine, but in my new game there are a lot of "strings" fields where you have to type something. Will this also work with the android launcher? Will the keyboard appear on mobile phones, so that you type something?

There's a built in keyboard, which you may bring by holding "back" key and choosing "keyboard" from the menu. But that is meant mostly for games which were not specifically designed for touch screen. If that does not suit your game you could script your own on-screen keyboard.

Ah cool, this works on my old iPad. But you can't delete what you wrote. Delete doesn't work  :-\  Is it possible to make the keyboard appear on the touchscreen? You know, the newer ones don't have a "back" key anymore.

QuoteIf that does not suit your game you could script your own on-screen keyboard.

Has anyone ever made a module for a keyboard?

Edit: I just tried with Galaxy tab s6. I was able to delete and use the touch button "Back" to bring up the keyboard. With my old Galaxy tab a6 (Android version 5 I guess) I was not able to delete what I wrote, I think it's the old version. It doesn't matter. Now my friends who don't have PC can play my game. Thank u.

#6
I have a question. As far as I remember I tried android launcher back then and it worked fine, but in my new game there are a lot of "strings" fields where you have to type something. Will this also work with the android launcher? Will the keyboard appear on mobile phones, so that you type something?
#7
Hi, is it possible to create a mac version of my game on Windows?

Edit: Forget the question. My friend will use Wine.
#8
Quote from: Crimson Wizard on Sun 18/07/2021 22:11:28
Updated DragDropCommon module to 1.0.1, fixing default settings, to avoid people stumbling into a missing GUI crash if they forgot to explicitly set a drag mode.

Thank u.
#9
The module works as in the video with AGS engine Android port (the app). Not quite drag and drop ;-D  by pressing and holding an inventory item, but I like it that way. It's practical too. I made the mouse cursor transparent so that it looks like it does on smartphones or iPads.



Quote from: eri0o on Thu 01/07/2021 19:22:32
WoaM and Kathy Rain use a different code that works with the old android port - I actually have the script code because I asked by mail the dev, but I think you should just ask them yourself. If you want to use this module and use the same behavior for mouse and fingers, you need to use the Android SDL Port.

I have a little game that uses this module too here: https://github.com/ericoporto/dungeonhands

It has touch on the webport, but I don't know how well it runs on old devices. :/

What do you mean exactly by Android SDL Port? Do you mean by creating an APK with monkeys plugin or your way with Android Studio? I wanted to try that anyway.
#10
Oh, I'm stupid. Thank u so much.
#11
There is also a problem that I didn't notice before. The inventory items interact with themselves (laugh) especially if you click on it once. I can't find where to check if an inventory item is on itself so that nothing happens.

I have this solution:

Code: ags

function ihoney_UseInv()
{
if (cJesus.ActiveInventory == ihoney)
{
 // do nothing  
}
}


But I have 60 inventory items. Do you have a quicker solution?
#12
Thanks for ur returning and answer. I thought you gave up  ;-D

I think I've tried this before because what's happening with this method has happened to me before, and what's happening is that it's wrong interaction again. It goes in the function directly to ELSE again and ignores IF and ELSE IF. Our example: Bread with honey, Jesus says: it doesn't work, instead of combining them together.

QuoteI don't think the repeatedly_execute_always is a "wrong" place, with that it may work all the time regardless of other things you do in rep-exec.

Okay. I will leave it there then. It doesn't cause any problems so far. I think that is the only solution. I don't know why but that is what it looks like.
#13
It works there.

Code: ags

function repeatedly_execute_always() 
{   
if (DragDrop.EvtDropped)
{
  player.ActiveInventory = null;
}

}


But I don't know if this is its right place.
#14
Quote from: Crimson Wizard on Tue 06/07/2021 12:33:27
I cannot tell without seeing full code of rep exec.

Ok.

Code: ags


Hotspot* prevH;

function repeatedly_execute() 
{  
  
 int x = mouse.x -280;
 int y = mouse.y -115; 
  InventoryItem*ii = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
  Label*lbl = gGui1.Controls[0].AsLabel;
  String text;
  if (ii) text = ii.Name;
  else text = Game.GetLocationName(mouse.x, mouse.y);
  
 gGui1.SetPosition(x, y);  // name over verbcoins
  

 
Character *chara = Character.GetAtScreenXY(mouse.x, mouse.y);
Object *obj = Object.GetAtScreenXY(mouse.x, mouse.y);
Hotspot *hot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
InventoryItem *inv = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);

if (DragDrop.EvtWantDrop)
{

  cJesus.ActiveInventory = DragDropCommon._InvItem;
  
  if ((chara != null) || (obj != null) || (hot != hotspot[0]))
  {
   ProcessClick(mouse.x, mouse.y, eModeUseinv);

  }
  
    else if (inv != null) 
  {
    
    inv.RunInteraction(eModeUseinv);
    
  }
}
 

else if (DragDrop.EvtDragStarted) // || (DragDrop.EvtDropped))
  {
    player.ActiveInventory = null;
  }
 
 /*
else
{
player.ActiveInventory = null;  // it works but not a good idea coz the name of objects over the verbcoins doesn't appear any more
}
*/





/////////// Pfeile an Hotspots


Hotspot* currentH = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
if (currentH != prevH) {
int pfeil = currentH.GetProperty("Pfeil");
if (pfeil == 1)
{
mouse.ChangeModeGraphic(eModeWalkto, 236);  
mouse.ChangeModeView(eModeWalkto, 24);
cJesus.Clickable = false;
}  
if (pfeil == 2)
{
mouse.ChangeModeGraphic(eModeWalkto, 232);  
mouse.ChangeModeView(eModeWalkto, 23);  
cJesus.Clickable = false;
}  
if (pfeil == 3)
{
mouse.ChangeModeGraphic(eModeWalkto, 240);  
mouse.ChangeModeView(eModeWalkto, 25); 
cJesus.Clickable = false;
}
if (pfeil == 4)
{
mouse.ChangeModeGraphic(eModeWalkto, 228);  
mouse.ChangeModeView(eModeWalkto, 22);
cJesus.Clickable = false;
}

if (pfeil == 0 || currentH.ID == 0) 
{

mouse.ChangeModeGraphic(eModeWalkto, 217);
mouse.ChangeModeView(eModeWalkto, 21);
cJesus.Clickable = true;
} 
if ((gMainmenu2.Transparency == 0) && (pfeil == currentH.GetProperty("Pfeil")))
{
mouse.ChangeModeGraphic(eModeWalkto, 217);
}  

}
prevH = currentH;

}   


#15
Quote from: Crimson Wizard on Tue 06/07/2021 00:33:50
Quote from: Amir on Mon 05/07/2021 23:48:47
I want the selected inventory item to disappear after the interaction or dropping, both in the inventory with inventory items and outside with objects

When you say "dissapear" do you mean dissapear from cursor, or dissapear from player's inventory?

From cursor  ;-D
#16
Sorry for bothering again. I'm trying something but it dosn't work. I want the selected inventory item to disappear after the interaction or dropping, both in the inventory with inventory items and outside with objects.

I used if (DragDrop.EvtDragStarted) player.ActiveInventory = null; so that it's not chosen twice like in the video. This works fine.

in repeatedly execute
Code: ags

if ((DragDrop.EvtDragStarted) || (DragDrop.EvtDropped))
  {
    player.ActiveInventory = null;
  }


or alone

Code: ags

if (DragDrop.EvtDropped)
  {
   player.ActiveInventory = null;   
  } 


The inventory item doesn't go away.

#17
It's a good thing that I refreshed here and saw your edit. I almost wanted to try something complicated. Now it works  (laugh) ur right about hot != null, I have often read it here in the forum but forgot it. Such a little thing can cause disaster like a butterfly effect.

There are a few problems but it has nothing to do with the module. I think I can solve them on my own or I would create a new thread. the biggest problem would be the Android port but it doesn't matter if it doesn't work. Programming with AGS is fun.

Thank u so much for ur patience and help.
#18
QuoteDoes the code ever pass under "else if (inv != null)" ? You may test that either by placing a breakpoint there or "Display" command with some message.

Good question. I tried Display command, nothing happened, the Display message didn't appear.

QuoteYou are running eModeUseinv interaction. Do you have event of that type ("use inventory item on") created for your items?
What is inside these event functions, are there more conditions? Can you post an example of your script?

Yes, most of them have "use inventory item on" I tried many items with each other with an event and it happens the same as in the video. I'm not just trying money with carrot  ;-D
An example for useing an inventory item with another item: honey with bread.

Code: ags

function iBrot_UseInv()
{
if (cJesus.ActiveInventory == iHonig)
{
  aBrotmithonig.Play(eAudioPriorityNormal, eOnce);
  Wait(80);
  cJesus.LoseInventory(iBrot);
  cJesus.LoseInventory(iHonig);
  cJesus.AddInventory(iBrotmithonig);
  
}  
else
{
     int i;
    i = Random(3);
    if (i == 0) cJesus.Say("Das ist eine bizarre, teuflische Idee."); 
    if (i == 1) cJesus.Say("Wahrlich, wahrlich, ich sage dir: Das geht nicht.");
    if (i == 2) cJesus.Say("Versuche das nicht, sonst landest du in der Hölle.");
    if (i == 3) cJesus.Say("Du sollst den Herrn, deinen Gott nicht versuchen. Das geht doch nicht.");  
}  
}


I think it's up to the module. something is still missing something like player.ActiveInventory = DragDropCommon._InvItem; I read through ur module, tried to understand it, I got half of it but I couldn't find out why the inventory items don't interact with other inventory items.

#19
QuoteWrong interactions, as in wrong verb, or wrong inventory item?

Wrong verb.

But with player.ActiveInventory = DragDropCommon._InvItem; it works, cool  :)  inventory items still don't want to interact with other inventory items.

Code: ags

if (DragDrop.EvtWantDrop)
{
  cJesus.ActiveInventory = DragDropCommon._InvItem;
  
  if ((chara != null) || (obj != null) || (hot != null))
  {
   ProcessClick(mouse.x, mouse.y, eModeUseinv);
  }

  else if (inv != null) 
  {
    inv.RunInteraction(eModeUseinv);
  }
}


I made a video of whats happening. I've tried a lot of things but it still doesn't work. I think something is still missing in the code.


#20
Oh, sorry, I made a mistake when I was trying to design my post here. I edited it.

GUI.ProcessClick is new to me but it dosn't work, I tried inv.RunInteraction(eModeUseinv); before but I'm getting an error "Null pointer referenced"
I tried
Code: ags

  if ((chara != null) || (obj != null) || (hot != null) || (inv !=null))
  {
   //Room.ProcessClick(mouse.x, mouse.y, eModeUseinv);
   //inv.RunInteraction(eModeUseinv);
   //ProcessClick(mouse.x, mouse.y, eModeUseinv);
   //cJesus.RunInteraction(eModeUseinv);
   //GUI.ProcessClick(mouse.x, mouse.y, eModeUseinv);
  }


Room.ProcessClick, ProcessClick, cJesus.RunInteraction work but wrong interaction I mean, when I have if, else if and else, it ignores the commands in if and else if and prints the commands in else, I mean it only sees "els" and  inventory items still don't interact with other inventory items.  ???
SMF spam blocked by CleanTalk