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

#1
here's my entry.



originally created for a 'nighttime' MAGS but unfortunately my story was _really_ lame and i didn't had time/inspiration to continue, so i decided to cancel it...

Just draw a car quickly to the background to let it look less empty...
But that's it with this background - i'll put it to all the other unfinished stuff on my comp... ;-)
#2
Quote from: Scarab on Tue 26/11/2013 03:40:25
"I am the frog catcher. I catch the frogs."

as a non-native english speaker i have to ask if this phrase is somehow a well-known phrase in english and if so, what does it mean?
Or does it just mean what i read, that i'm catching frogs (animals) and so i'm the frog catcher?

Otherwise if there is a different meaning of this phrase, translations may vary... :-P

#3
one guess what you can try is to put the else branch in { } and add the if statement inside it.
Maybe its a compiler issue with the if else, as i know that sometimes unexpected things like what you describe can happen.
(even i could not reproduce such misbehaviour with a if/else if test here)

try
Code: AGS
 if (player.ActiveInventory != null)
          {
                //player's Active Inventory is removed in this branch.
          }
      else 
          {    
            if (player.ActiveInventory == null)
             {
                //Player's active inventory is updated in this branch.
             }
          }

does it fix the problem?
#4

Code: AGS

//you set:
player.ActiveInventory = item;
//...
item = null;


and afterwards you check for:

Code: AGS
if (player.ActiveInventory == null)


maybe that's the problem, because at that time ActiveInventory == null?
#5
ah, i see.
makes sense and hopefully i will not run into it again, now i know it. ;-)
thanks for the explanation
#6
Hey there,

i was just wondering if the following is a known bug or not with the editor/compiler (or a feature?!? :P), cause i didn't find anything related so far in the bug tracker or forum:
 
Code: ags
  
    //---------------------
    // AGS version: v3.2.1
    //---------------------
    float a = 3.0;
    a *= -1.0;    // NOK: parse error at 'a'
    a = a * -1.0; // NOK: invalid use of operator '*'
    a = -1.0 * a;   // OK


took me quite some time to figure out what was blocking my script to compile... :(
#7
For the target i would just use an area and calculate the shooting result by coordinates.
for example, something like your target area has a width=100px and height=100px at a position x=10,y=10 and when the user releases the left mouse, you get the mouse coordinates and compare them with your target area. When the area is hit, you can calculate the distance to center of your area and generate scores according to it.
In this case you're toallty independant of any extra hotpsots, overlays, etc... you only need a target sprite and maybe one hotspot for it, so you can determine if the target area was hit at all. the rest is simple math. ;)

You can use a character for your arrow and use the automatic scaling functions, so you can just move your 'arrow' character to the target and let it scale automatically.
Well, that will not generate a parabolic flight of the arrow... If you want something like that, you must write your own scaling function
#8
So far i don't see any specific question, so it's hard to help you without writing complete functions for your needs. :P

You should break down what you need and start to create you Game step by step and when you have concrete problems with your code/stuff, ask for help.

I would start f.e. to create a target area in the room and print some information, when the mouse is clicked in the target area. (maybe use an object as target area? )
when this works as expected, add some zooming to the target (scale object? )
afterwards add the mouse jitter. (e.g. create a function which is always called, when the left MouseKey is pressed)
then you add what should happen after you've released the mouse key, like updating the target area, etc...
and so on...
#9
Hey!

you could use a grid (2-dimensional array) - like for a tile-based game - in which you use an number for your player possible movements.
Example for a 4x4 grid:






1444
1003
1003
2223

the possible direction (e.g. variable: movDir) for your player are:
1 = move down
2 = move right
3 = move up
4 = move left

After you've rolled the dice, you check the current position of your player in the grid, get the next direction and move accordingly.
So, when the player starts in the top-left field, it will read the movDir == 1 and you know that you must walk down.
Attention: You must move your player always only by 1 position and then check again the next direction, before your next move... otherwise the player  will miss the corner. ;)


SMF spam blocked by CleanTalk