RomanCenturion's Recent Forum Activity

  • You can run construct off of a USB on a computer with windows xp. I know that because that is what I'm doing right now(it still works when I take it in and out of the slot). However, I'm not sure that it would work for multiple computers. Have you tried installing it onto the USB on one of the university computers? I know that with some computers, they'll allow you to install to a drive even though they won't allow you to install to the main drive.

  • Thanks, after looking into it, I think both ways will work for what I need it too. I'll test them out and see which one works best. Thanks a lot!

  • Basically, I want to count how many objects (different objects and all their instances) have the variable "selected" set to "yes" and set the value of global variable "unitCount" to the amount counted. However, I don't want to add to the global variable each time "selected" is set to "yes" since it would make certain controls in my project more difficult to make. Any help is appreciated. If there is no way, please let me know. Thanks.

  • For anyone interested in making the screen scroll based on mouse position, I made a python alternative.

    #Scrolling
    scrollx = System.globalvar('scrollx')
    scrolly = System.globalvar('scrolly')
    scrollratex = 10
    scrollratey = 10
    if System.MouseX > scrollx + 305:
    	System.ScrollX(scrollx + scrollratex)
    if System.MouseX < scrollx - 305:
    	System.ScrollX(scrollx - scrollratex)
    if System.MouseY > scrolly + 125:
    	if System.MouseY < scrolly + 140:
    		System.ScrollY(scrolly + scrollratey)
    if System.MouseY < scrolly - 230:
    	System.ScrollY(scrolly - scrollratey)[/code:a4lnsttt]
    I'm using it in my game and it works fine so far with two layouts. The reason why I used global variables was because I was unable to find a way to get the scroll position in python. Anyway, I made my own grass background texture for the game! I'll upload the next version once I get a dragbox selection tool added.
  • There are several ways to do this. One way would be to add a global variable and add the condition "global variable generator is equal to yes" to what you already have (probably the best way). Also, you would need to add the action "set global variable generator to no" to the event that destroys your generator. Another way you could do it would be with private variables instead of global variables (this would probably be used for multiple generators). However, the shortest and probably least complicated way(as in least steps) to do it would be to add the inverted condition "generator is inside layout" (you can invert a condition by right clicking on it and selecting "Invert Condition") to what you have(I'm guessing this is the worst since it would probably use more cpu.)

    Good luck!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can tell you how I made it scroll, though it's probably not the best way. Basically, I placed four sprites(invisible on start) in the shapes of rectangles around the edges of the screen on my second layer(note:this was the menu layer, the first layer was the game) and set its scroll x/y rates to 0. I also added another sprite(also invisible on start) and gave it the "Center view on me" attribute. The last object I added was the MouseKeyboard object. Finally, on the event sheet, I placed conditions so that when the mouse was over the sprite on the right side of the screen, the sprite(with the attribute) would move right, etc. If you need any clarification, feel free to ask. Also, I believe most of the steps are described in the Help forums. Though, I don't think the whole process is described there.

    Edit: You'll probably have to limit the movement so that the sprite won't move farther than the screen can move. Something that's not included yet in my game. That's why occasionally it will seem that the sprite isn't moving even though it is, it just moved farther than the screen so it takes a while for it to get back.

    Edit2: As opposed to using a sprite to center the screen on, you can use Scroll x/y, something I wasn't sure how to do at first. Anyway, on the event sheet, have when mouse over right sprite, System: set Scroll to X ScrollX + 10, etc. I'm still working on how to not use sprites on the sides.

    Edit3: I worked it out . Here's the event sheet roughly:

    C:System-Compare: MouseX > ScrollX + 200

    A:System-Scroll to X: ScrollX + 10

    C:System-Compare: MouseX < ScrollX - 200

    A:System-Scroll to X: ScrollX - 10

    C:System-Compare: MouseY > ScrollY + 200

    A:System-Scroll to Y: ScrollY + 10

    C:System-Compare: MouseY < ScrollY - 200

    A:System-Scroll to Y: ScrollY - 10

    The values 200 and 10 should change depending on the size of your application. Also, it probably only works for one layer.

  • Thanks! It may take a while, but as long as I stick with it I can finish it.

  • Basicly, I've started making a game similar to Age of Empires. At first, it's going to be a lot like Age of Empires, but I'll individualize it once I finish setting up the basic game. This is only version 0.01, so obviously there's not much too it yet. Also, before anyone says it, I know the graphics are awful. I'm just starting a thread so that I'll be motivated to complete it.

    All or most versions can be found here:

    http://www.box.net/shared/k1q0rpb89z

    Most recent:

    http://www.box.net/shared/x2ynnfdcsh

  • Thanks for letting me know about triggered conditions not working in Python. I can probably get around it by putting python as a sub-event to the MouseKeyboard action.

    Also, helpful to know combo parameters.

    Thanks a lot everyone! I can't wait to finish version 0.1 of my game.

  • I have no idea if this will work, but here's a possible solution. I would add a canvas into your application. Then, I would paste the object webcam onto the canvas. I'd use image manipulator next to save it as whatever type you want. I don't have a webcam, so I can't try it out, but it may work. Lol.

  • I was wondering how to use the MouseKeyboard on object clicked event in python. I was able to get this far:

    MouseKeyboard.OnClickObject(left,single,Object)[/code:20m0o9c6]However, "single" isn't the correct syntax. Any idea on what to use instead? Thanks.
  • [quote:2h1rx0he]There shouldn't be any limit to python scripts. I was able to run a 100 line script without any issues.

    [quote:2h1rx0he]I've got a few scripts well longer than that, with no problems.

    I don't know why, but it's just ignoring the lines of script. Your'e probably right about it not being limited though, I switched a few lines around with the same result.

    Thanks for the link Silent Cacophony, it looks helpful.

    Edit:Could someone show a simple way of making and getting information from a dictionary in construct? I'm not doing something right and it's frustrating not being able to figure it out.

    I found out how to do it

    d1{}
    d1[1,1,1] = "Hello"
    d1[1,1,2] = "Bob"
    ...
    Text.SetText(d1[1,1,1] + " " + d1[1,1,2])
    #Sets text of Text to "Hello Bob" without the quotes
    [/code:2h1rx0he]
RomanCenturion's avatar

RomanCenturion

Member since 6 Apr, 2010

None one is following RomanCenturion yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies