Phobos002's Forum Posts

  • Okay, I took a look at your cap and made some edits:

    http://dl.dropbox.com/u/2306601/plinus_edit.cap

    First of all I noticed that you placed the gameplay area full of blocks in the layout editor, which is unnecessary. Even if you do want blocks sitting everywhere right from the startup, you should use a loop to create them (toggle event 2).

    Also you didn't seem to have made up your mind whether to use different objects or different animations to represent the different blocks/gameplay elements in the level editor. I think it's usually best to have one single object with different frames in a 0 speed animation. So I added that in.

    And I didn't see that you set the size of the array anywhere. You can just calculate the array size from the size of the layout/display on startup (first event in my edited cap, note that the -2 accounts for the border). Also it's a good idea in a game like this to have a global variable representing the size of a cell (Global('cellsize')). So you can easily reuse it where needed and your game will still work if you suddenly decide to change the size of a cell too.

    Well, loading and saving, it's obviously just some array loops. Checking for blocks at the currently looped position. And eventually storing the frame number/creating the object and setting the frame number. If there's no object at the current array position, the value is 0. Anything above 0 represents the animation frame number.

    So yeah, take a look at the cap. I hope this is helping. For further questions you know what to do.

    It helps a lot! But what confuses me is that I don't know how you saved the blocks, because I created a new object and it didn't save it.

    And all you did( for saving ), as far as I can see, is clearing the array with a value. Where are the events that save the information about the blocks?

  • I do believe there are quite a few examples around the forum for this. A recently added array map editor seems like a good match:

    Haven't tried that one myself.

    > Please help if you can. (And I know you can. )

    >

    You're right about that.

    In case you absolutely need specific help with your cap, say so and I - or someone who's faster - will take a look at it.

    Yes. My game has a border around the edges, and I just don't know the right formula for having the objects inside the thing and not the borders, and also save it.

    Here is another cap: http://www.megaupload.com/?d=X6NN82FA

    Please help if you can.

  • I am trying to make a editor for my game so that I can make levels easier, but I am having issues with saving arrays. How exactally does an array work, and how would I save it in this case? I tried using R0J0Hounds array saving application as a guide to the right direction, but, alas, I don't honestly know what I am doing.

    http://www.megaupload.com/?d=PXREUT8D

    There is the cap file.

    CONTROLS:

    1 - Solid Block

    2 - Empty Space

    3 - Plinus block (More will be explained for this object later)

    There is also objects:

    SPACE - Spawn interchangeable object. (Only player spawn atm)

    Please help if you can. (And I know you can. )

  • [quote:vywpsd2b]Is it possible to rip the python code from a .cap/.exe made from construct, or will I have to do stuff from scratch?

    If you have the cap you can just copy and paste the python scripts.

    [quote:vywpsd2b]I want to do this because it makes making my game modifiable far easier then rewriting every event in python. That and I don't know python, and I hope that I can learn from reading the events in python.

    Construct doesn't convert events into python, you would have to rewrite your events into python manually.

    For learning python in general I've found these two links to be useful:

    http://docs.python.org/tutorial/index.html

    http://www.tutorialspoint.com/python/index.htm

    If I misunderstood your question please clarify.

    Thanks a bunch! I wish we could rip out python code from Construct though. Maybe I could ask in the suggestions thread so it can be added in Construct 1?

  • Bump

  • Is it possible to rip the python code from a .cap/.exe made from construct, or will I have to do stuff from scratch?

    I want to do this because it makes making my game modifiable far easier then rewriting every event in python. That and I don't know python, and I hope that I can learn from reading the events in python.

  • Link is broken.

    Also, I heard the LOS behavior is glitchy. But maybe you should try the distance(x1,y1,x2,y2) value. for example:

    +System - For Each Enemy 
      +System - Value: distance(player.x,player.y,enemy.x,enemy.y) Lower or Equal 300
         -> Set speed Enemy to [WHATEVER]
         -> Enemy - Create object Bullet
         -> Bullet - Set angle towards object Player[/code:3usv6dop]
    
    At least, that's how I would do it.
  • It's that enable scripting bug, uncheck it and the crash will be eliminated.

    ...I feel really stupid right now...

  • This is indeed VERY strange. I got a different error to you:<img src="http://dl.dropbox.com/u/6660860/error.png">

    As you can see my error points to object_player_arms, at event 0 on the AI event sheet. So maybe the issue lies somewhere in the event sheet itself and not with a specific object? There isn't even an "Event 0" .

    Sorry i can't really help more than that, this one has me stumped, but maybe it will guide you in the right direction on where to look for the problem .

    Edit:

    I decided to test it some more and disabled the AI event sheet, and got this error:<img src="http://dl.dropbox.com/u/6660860/error2.png">

    So maybe its not the AI event sheet at all. I also tried toggling different events on and off in all sorts of different combinations and NOTHING seems fix it .

    I'm sure it will turn out to be something simple though

    I guess my version of construct is HAUNTED.

    OooOOOoOoOoooOooOOOOOoooOOOOOOOOOO!!!!

    EDIT: On a related note, I would REALLY like to know where that huge ass number came from.

  • I get some errors when messing with grenades.

    EDIT: Whoops, images go out of the thread. Right click and click "View image" to get the whole thing.

    I forgot how this one was generated:

    <img src="http://img502.imageshack.us/img502/4808/runetimeerror.png">

    But THIS one ALWAYS triggers when exactly 58 grenades explode. At the same time or individually.

    <img src="http://img403.imageshack.us/img403/6429/runetimeerror2.png">

    And, just to let you know, there is NOTHING relating to grenades in the AI Event sheet. I don't know why it is saying that. :

    Here is a cap (Outdated, but has the same errors): http://www.mediafire.com/?ar0hhprqscyhhwn

  • I dunno what cause this error.

    http://s61.photobucket.com/albums/h53/S ... ent=Da.png

    It most likely means that the application is calling for an object (An instance of the object in this case) that doesn't exist. That's my best guess. I would check to see if there might be anything removing it when you start up; perhaps it is too far outside of the layout?

    Of course, I could be entirely wrong in every way, but it would be a good place to start.

  • Alright, I got him to move and stuff, but he only moves when I collide with it, which means he will just charge at me. I think this would be a cool thing to do instead of slowly trudging along.

    Also, a tad off-topic, but I noticed when I explode exactly 58 grenades, the plug-in crashes, which stops my game. It doesn't have to be at the same time either, just when I reach grenade #58.

    When I DO overload the game with grenades- *PC Blacks out* *Does Cold-Shutdown*

    ...

    ...

    OK, back. Anyways, If I do overload the grenades (Throw them consistently), and reach 50 something grenades exploded, the game crashes, saying that a error was caused by the player_arms object. Which is weird, considering it has almost nothing to do with the grenades. Is this a plug-in bug or am I doing something wrong?

    The cap in my above post contains the same conditions for grenade-throwing functions.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Your mixing platform with custom movement...

    Erm, the zombie HAD a platform behavior, but I removed it before even making this thread...

    A bug, perhaps?

    Anyways, I am going to make the object from scratch. That way, it should work right, and stuff...

  • Like I said in the first post.

    http://dl.dropbox.com/u/666516/offsetplat.cap

    Offset works well for is left and is right, you just have to get your movement correct, or add additional offset comparisons for the gap made when the troll moves.

    WAAAAH! WHY DOESN'T IT WORK!?

    Take a look for yourself: http://www.mediafire.com/?ar0hhprqscyhhwn

  • Distance gets you the x, and the y, offset gets you the x, or the y.

    You should just use one for your detection.

    Also the way you have it set up your saying if the distance is greater than 300, or the distance is less than 300 then move, but that will make the troll move all the time, and distance() doesn't care if the player is to the left or to the right.

    The reason I had the distances there was so that he would only go after me if I get close to him.

    If it is going to cause problems, how else could I do it without distance(x1,y1,x2,y2)?