GarrisonPrime's Forum Posts

  • Would the Object Bank Layout effect the duel player problem? Should i have all the same layers there too?

  • I checked if I had any "on start of layout" with my player, I do not see anything like that. I do have an Bank Layout that has only objects like my camera, bullets, player sprite, and cross hair, I made all the layers similar to my first stage layout but double player and cross hair still persists.

    This is my current level one to level two Event Logic. The camera kinda goes in between the two players that appear in the second level. I have a small prototype that moves the player from layout to layout like this and it works fine, no second player sprite appearing, I am not sure where the differences lay.

    + obj_player_mask: On collision with OTriggerWest

    -> System: Set PreviousMap to 01

    -> System: Go to Layout 1

    -> obj_player_mask: Set position to (672, 224)

    -> obj_gun: Set position to (672, 224)

    -> obj_camera: Set position to (672, 224)

    -> obj_cursor: Set position to (672, 224)

  • I have a player sprite, a gun object that rotates around the player, with a crosshair that follows the mouse, and a camera object that follows the player. Everything runs every tick. And all objects are Global. Works fine in the first layout, but after i change layouts, to say level 2, my player is invisible and i have a second set of crosshairs and player running around, one thats visible but isn't attached to the camera.

  • I used Variables to control which weapon is active. 0-5, each weapon pick up is determined by its corresponding variable, works great.

  • Thanks! I'll definitely give that a try this weekend.

  • I am having issue uploading the pic of my event sheet, so i just copied the text for now.

    + obj_player_mask: On collision with oNewGun

    -> System: Set group "Weapon Two" Activated

    -> oNewGun: Destroy

    + Gamepad: On gamepad 0 D-pad down pressed

    ----+ System: [X] Weap_num ≥ Arr_Weapons.Width - 1

    -----> System: Add 1 to Weap_num

    ----+ System: Else

    -----> System: Set Weap_num to 0

    [Weapon One]

    ----+ System: Weap_num = 0

    -----> obj_gun: Set animation to "ID_MACHINEGUN" (play from beginning)

    --------+ Gamepad: Gamepad 0 Right shoulder trigger is down

    --------+ System: Every 0.16 seconds

    --------+ obj_gun: Is animation "ID_MACHINEGUN" playing

    ---------> obj_gun: Spawn obj_bullet on layer "Player" (image point "Bullet")

    [Weapon Two]

    ----+ System: Weap_num = 1

    -----> obj_gun: Set animation to "ID_MINIGUN" (play from beginning)

    --------+ Gamepad: Gamepad 0 Right shoulder trigger is down

    --------+ System: Every 0.12 seconds

    --------+ obj_gun: Is animation "ID_MINIGUN" playing

    ---------> obj_gun: Spawn oAI_Bullet on layer "Player" (image point "Bullet")

  • Here's a picture of my Event Sheet.

  • I tried that, bullets from weapon one still fire from weapon two when Group one is Deactivated. Also I would like to add more than two weapons to the game, so I am not sure if Groups are the thing to go with or not. I am using an Array to swap initially swap between weapons once a second gun is picked up by clicking on the d-pad.

  • I have two guns set up in their own Group, First one is active from start, the second is activated after picking up a new gun. Works great but when i go to fire the second gun, one bullet from Group one also fires a single bullet on first trigger tap. Not sure how to fix this.

  • Thanks for the help, It works out great! Thanks again.

  • I gave the bullet a Line of Sight behavior towards the Enemy, I've tried all sorts of Move at Angle or Towards Object or Set Position. Not sure how to do this.

  • Okay, Got it. Thanks! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great News, I got things working properly. The right stick and mouse both move the Retical. Though I noticed if I change the game layout size, the logic stops working and the right stick does not work again. Is there a way to modify something to where I can make my game maps bigger without breaking the logic? I tried to modify some of this logic... but without success.

    -> Retical: Set position to (lerp(Self.X, ((Gamepad.Axis(0,2)+100)÷200)×LayoutWidth, dt×5), lerp(Self.Y, ((Gamepad.Axis(0,3)+100)÷200)×LayoutHeight, dt×5))

  • I downloaded it properly and was able to see your game and check out the logic you used. Though after applying it to my game, the right stick does not move like your demo. In fact the sword I am using to swing around the player, Rectical should follow, moves almost in only 4 directions and always comes to a stop pointing lower-right. The Rectical does not follow and after going from mouse to stick and back again to mouse, the mouse no longer functions properly. I added all the Global events like your demo and placed the Logic at the very top of my Event List. Here is what I have so far.

    + System: Mouse.X ≠ Mouse.X

    + OR System: Mouse.Y ≠ Mouse.Y

    -> System: Set mouseX to Mouse.X

    -> System: Set mouseY to Mouse.Y

    -> System: Set control to "mouse"

    + System: Else

    ----+ Gamepad: Gamepad 0 Right analog X axis ≠ 0

    -----> System: Set control to "gamepad"

    + System: control = "mouse"

    -> Reticle: Set position to (Mouse.X, Mouse.Y)

    + System: Else

    + System: control = "gamepad"

    -> Reticle: Set position to (lerp(Self.X, ((Gamepad.Axis(0,2)+100÷200))×LayoutWidth, dt×10), lerp(Self.Y, ((Gamepad.Axis(0,3)+100)÷200)×LayoutHeight, dt×10))

    + System: Every tick

    -> Camera: Set position to (lerp(Self.X, Player.X,0.10), lerp(Self.Y, Player.Y,0.10))

    -> Sword: Set position to (Player.ImagePointX("Sword"), Player.ImagePointY("Sword"))

    -> Sword: Set angle toward (Reticle.X, Reticle.Y)

    + System: On start of layout

    -> Camera: Set Invisible

    -> Mouse: Set cursor to None

    + Reticle: Is overlapping Sprite

    -> Reticle: Set animation frame to 1

    + System: Else

    -> Reticle: Set animation frame to 0

  • It says .capx files can’t be previewed. I tried to download it into my Dropbox, but every time I try to open it, it freaks out my Chrome browser, constantly tries to open new windows.