Sup with that?'s Forum Posts

  • You can probably just put all Sprite_A objects in a family and set the family to invisible.

  • Already have all those Though I tried using the Scroll effect to try and do it. Problem is, when applied to the layout the effects seem to be bounded by the edges of the view port rather than the entire layout, which can look a little strange.

  • I'm trying to achieve a kind of "seamless wrap" effect, similar to the Wrap behavior in function but visually distinct, if you will. Basically, instead of seeing the player actually leave the edge of the screen and reappear on the other side, I'd instead like the player to always be centered, never getting closer to any of the edges, and have the environment wrap around him instead of the other way around. Imagine it like traveling in a straight line around a ball, where you'll eventually end up on the spot you started without reaching an end or beginning.

    My basic idea is to have the player not have any actual movement of his own, and instead have everything else get moved around by the player's controls. Thus everything else can have the Wrap behavior and wrap around the world while the player remains at its center. Sounds like it'd work on paper, but would it be CPU intensive if there were a lot of objects on screen, all getting nudged around at the same time? I was wondering if anyone has any suggestions on how to better achieve something like this.

  • I don't think I ever tried this in C2 so can't guarantee it'll work, but as I recall in CC I managed to do something like this using two objects in a container (let's call these Arc and Turret). Arc was basically an invisible doodad that I used to reference the angle to determine a cone of fire, Turret was just the turret. If Turret turned too far in relation to Arc, it would unacquire target, rotation would be disabled and it would manually get rotated back within its field of view.

    Perhaps you can also use Line of Sight behavior on Arc to augment it, I didn't get very far in my experiments unfortunately. I wouldn't say this is the most elegant solution, but it worked ok for the limited function I needed it for.

  • Tha'ts most likely because the tilemap is on top of the layer, i.e. in front of all the other objects, and since it automatically spans the entire layout, you can't get around it. To put it on the bottom, right click on it and go to Z Order > Send to bottom of layer. Now you should be able to select other objects.

    Another alternative and perhaps the easier solution is to make a separate layer for it, then sort the layer under the old one and lock it. This way you don't have to worry about accidentally selecting the tilemap unless you unlock it. The layers tab should be available next to your projects tab on the side by default (IIRC). If you can't see it, go to View and make sure the Layers Bar check box is checked.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you have events to move the object? Custom movement behavior won't move an object by default so you'd have to have events to tell it which way to move. Setting the Stepping Mode to horizontal then vertical isn't the same as making it move.

  • It should technically work for multiple weapons. Basically what I did was have the action variable double as cooldown, so that if action button was pressed -> subtract from cooldown. When cooldown = 0 + object on screen -> action + reset cooldown. Since each object can reset cooldown to a different value, they could both be equipped and still function differently i.e. have different rates of fire and such.

  • Could you be more specific with what the problem is? There is a Drag & Drop behavior already installed in C2 which should let you, well, drag and drop objects.

  • Well, firstly, if it's a top-down view, could Pathfinding behavior possibly be a better solution since it'll avoid obstacles?

    For the rest, I think the easiest solution might be to use rexrainbow's PushOutSolid behavior. It'll basically prevent an object from crossing solids without altering the object's orientation or anything.

  • Well, perhaps the simplest way would be to have separate objects for the different characters, then on character change spawn the new character right on top of the old one and destroy the old one.

  • So something interesting I came across, I plugged R0j0's Chipmunk physics into the RTS template and it seems to work rather well. I didn't do anything besides turning off gravity and just let the default pathfinding behavior do the moving.

  • Ok so lemme see if I'm understanding the situation correctly up til now... There are several objects with a variable, each one has a different (changing) value assigned to this variable, and you need the sum of all these individual values?

    Perhaps this could be done with a For Each loop, though I probably wouldn't assign it to Every Tick anymore because it might slow down performance. So it could look something like this:

    (Assume global variable is used for the total sum)

    Every 5 sec -> set Global Variable to 0

    [sub event] For each Object -> add object's variable to Global Variable

    This should tally the variable of every individual object, and the global variable should be set to 0 to avoid stacking old values with new ones.

  • If it's just the total number of sheep currently on the layout that you want to keep track of, then yes, you should just be able to assign the variable/text to Sheep.Count (where "Sheep" is replaced with the actual name of the object, of course) to give you the total. Wouldn't know why it's not working, unless some other event is mussing with the value.

  • You should be able to simply plug the value of the variable into the text object. Just do something like,

    Every tick -> Set text to variable

    Note you don't need the quotation marks when you set text to a variable, or else it'll just spell out the variable name.

  • Well, unfortunately I haven't delved into isometric projection much when it comes to C2, but perhaps you can make use of rexrainbow's movement behaviors. In particular behavior: rex_grid move

    As far as selecting buildings on the sidebar, I imagine it'd just be a matter of having an object follow the mouse on the grid after you click its icon.