0 Favourites

help 3

This forum is currently in read-only mode.
  • Assume the position in the attached .cap

    2 Questions.

    What did i do wrong to keep it from running ?

    How do i keep the defenders & the locks pinnend on there image points towards the moving controller?

    I dont want them to rotate when the controller rotates, just jump to there new positions

    Ty

  • Deleted inflammatory replies. Next person to be stupid enough to do so will see a 24hr ban.

  • Ash, this cap's giving me nothing but a runtime crash on both Vista SP1 and XP SP3. Is that what he meant when he asks "What did i do wrong to keep it from running?"

  • The crash occurs because of this expression:

    {"cornerdefend", "middledefend", "crossdefend", "backdefend"} at int(random(4)+1)

    If you remove it, it runs again. I'll investigate this bug when I have more time.

  • Ty for the answer on my first question.

    The expression worked fine in other circumstances, dont know why/how its stuck now.

    Of course i could not run the .cab to test what i made.

    But i hope the second question still remains ..

    In de help u gave round the 2 first .caps there is still a point i worry about.

    Namely,

    u did not only moved the instances created on runtime, but also the original objects from what the instances are created from.

    Any destroy event will also destroy the orginal objects, and at that point i will be stuck.

    Can i suggest a solution, and there are more ways to solve this.

    Way 1

    Give objects a property called, uhh lets say "Allover"

    I am sure u will come up with a better name.

    An object with "Allover" set can be placed on another layout then the layout the events editor is working on, and be accessed from any event sheet editor, but only to create/spawn instances from.

    This way you can make a layout, fill it with objects that will be created/spawned in an other layout by the events in the coupled event sheet editor.

    At this moment layout(x) is paired to sheet editor(x)

    In other words, the original objects will not be touched, they are protected.

    Way 2

    Create a Special layout. Call it, lets say "global layout". In the first step there will be no event sheet editor coupled to this layout. Objects placed on this layout can be accesed from any event sheet editor to spawn/create from to their coupled layouts.

    Later on u can add/pair up a special event sheet editor to it. And give the objects placed on "the global layout" easy behaviours by events. Like a rotation. Like a direction to move. Like a loop that gives it a pulsing effect. Like loop that makes it visible/invisible ever x ticks.

    When this object gets created/spawned it keeps that global movement at the moment of creation.

    remark: their is a "global" switch un the common tab in object properties. I was hoping it makes the object accessable global, so over all layouts and there event sheet editors. But thats not what it does.

    Hope u see what i mean Ashley.

  • I believe you can already do exactly that. This is how I have used my own sprites between layouts. Retry everything you just said - it should work. I believe you only missed something along the way.

    Object names are global as is. Even if you have to paste new instances in the layouts that contain them, they are still merely new instances of the same object maintaining all the conditions and behaviors you've set to them.

  • If you don't want the starting objects to be affected by events which affect other objects, why not make them separate objects?

  • Ash, the first thing I can think of there is file size. I've had to rethink some of my objects due to the quality of the graphic files I use. When I make multiple same objects, the filesize skyrockets. I've found it best to creatively code around that, using specific triggers embedded in the object's variables set to manage events.

  • Because Ashley,

    i dont feel for making 2000 objects, and 2000 events to control them. Take the example of tetris. I made that for my love btw. She loves tetris, but hates it to speed up. If she playes 1 houre, she will move 2000 blocks arround by easy.

    Captain ? do me a favor.

    Make 2 layouts. Place an 1 object on both. See if u can acces the objects on layout 2 from out the events editor coupled to layout 1.

    Its not working for me. They dont show up in the pick requesters.

    Dont u guys see the benefits of a kinda of vault, a place where u can create instances from, without the orginal objects beeing in the layout ?

  • um Captain ? uh you are right.

    you can do this. and u are rigth that i missed "something"

    *bows gracefull*

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • thx4this4ndthat

    Hey, we're all in this to help each other out. You would only benefit from placing courtesy foremost. There are a lot of users here that are somewhat.. less patient, and stoop to countering insult with same.

    As for your 2,000 objects, do what I do. Control how events manage your objects by setting up a structure for each event with a variable.

    For instance, can the same object be used in two different ways? Create within that object the variable "State" and load your events with that trigger. This will allow you to clearly define when certain events are allowed to activate.

    +Object.State == "can be used here"
    -Do stuff
    
    +Object.State == "cannot be used here"
    -Do other stuff[/code:2tbqj6pd]
    
    It will save resources, and should feel better over all.  Of course, I'm sure this isn't the best way to go about this, but it works very well for me.
  • Moms taught me to place Honest above Polite : )

    ok but now .. how to let the object move every so many ticks by lets say .Y + 10

    in the attached .cap

    (man i cutted objects from one layout into another layout, cuz u said there names are global, construct did't like that and punished me with some rainy day errors)

  • Another thing to try when wanting to use any object from another level is to use a new event sheet and include it in your layout. For this, I have made an event sheet called "Movement" and called a position change every X ticks.

    Include Event Sheet "Movement"
    
    System: 0 Every 30 ticks
    

    Sprite2Set Y to Sprite2 0 .Y+10

    [/code:3ksyd8h4]

    Every X Ticks is found in the system object. Please review the functions of the system object until you are familiar with them.

  • allright, bedtime again.

    you know, i never ever gave up on something in my live.

    All english i type, i learned from forums and chats. I dont even speak it, i dont know how to pronounce most words.

    In base i only wanted to make that one tetris clone for my girl. To see my woman happy is the reason to live.

    But as always, it did bite me. It glues to my butt. And i cant shake it off.

    I so dislike it that i was able to make it in another "program" and not in construct.

    While allover, construct seems to be a great programm.

    And there been no program yet that i could not master till into every detail.

  • you use phyton , right ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
157 12,698
megatronx's avatar
megatronx
Unread hot topic
0 Favourites
Kiira will help! :D
132 16,624
Kiira's avatar
Kiira
Unread hot topic
80 7,184
jobel's avatar
jobel