mimiha's Recent Forum Activity

  • Hi! I have this Z-ordering issue which I'm not sure what the problem is exactly but I'm lead to believe it is because I'm not understanding picking correctly? It might be something else, but I'm a hair away from just giving up entirely ::))

    Subscribe to Construct videos now

    As you can see, when player overlaps with collision box below them, the sprite above them becomes above them too, which should not happen.

    Here's my code.

    Every sprite (e.g. the tree, the sign) has a collision box generated at startup at the same time as them. Collision box knows it belongs to a particular sprite because of its "parent" variable which holds the UID of the sprite. Every sprite is in the family fam_sprites.

    So When a player is overlapping the collision box, I ask it to pick the sprite from fam_sprites that the collision box in question belongs to, so that I may move the sprite behind or below the player accordingly,

    But it seems that the picking of fam_sprites doesn't matter as the player moves behind ALL sprites in fam_sprites regardless.

    Am I approaching this wrong? How could I get around this?

    [Edit: I solved this using Z-sorting system function which wasn't here the last time I worked on construct 2... I put all my sprites into another family called Zorder, then every tick set the Zorder family isntance variable to their Y, and then when the player overlaps a collision box, Zsort the items.]

  • Oh ok, I didn't know Count was not an array-exclusive thing! I usually see "count" as array length in other languages

    I found the best way for my situation was to have a variable that updates each time I add to the array. Thank you for the solutions!!

  • I thought "count" would do it but when I use Array.Count on my array, which is 50 wide but have 5 elements filled, it returns 1. (???) and "count" isn't actually documented on the manual page so I have no idea wtf it's supposed to do.

    I guess I could use Array.Width but looping through a ton of empty space seems like a waste of computing power...?

  • (my post disappeared when editing this for some reason...?)

    Sorry to bump my old thread but I feel insane, I can't get this stupid pick thing to work.

    My old question is fixed but because this relates to picks and I'm still having issues coding additional functionality to my OP I'm just adding to this thread.

    Background:

    In a function that is called on startup, I create all hotkeys in a FOR loop, from 1-10, and number their ID's based on their loopindex. (This works fine)

    Then, I do a function at the end that picks a hotkey based on the ID from the parameter.

    This is the function. It does nothing. It picks nothing. Even with "pick all" nothing goes into its pick list.

    I tried placing this function into startup, and nothing happens either. However, when I place the exact function call on a keyboard press (Q), it works perfectly. so I still must not be understanding how the F pick lists work because my function WORKS, just not WHERE I want it.

    This function all used to be under the startup condition where it worked fine but when I separated it into different functions now shit's going to hell. I can't figure it out. I thought that having a function be called would start from the top of the pick list, but i guess it's some kind of problem having the function be inside of another function that manipulates the object...? But then why wouldn't it work on startup, calling the two separate functions? Why does it only work when I assign it to a keyboard key? RRRGHH.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mimiha

    Make sure .NET is up to date - 4.5.

    I see, thanks - if I may suggest, you should update the first sentence under the picture on the first post (that says it requires 4.0); this is where I checked what version of .NET was needed and assumed something went wrong, I didn't look any further down because I only got the latest version (3.1) and was not interested in any other version where I thought it was just changelog stuff.

  • For some reason I can only get version 1.12 to work for me - anything above immediately crashes and leaves an error in the event logs. Someone on one of the earlier pages of this thread had the same problem as me but got it fixed by upgrading to a higher version but it seems I have to downgrade to get it to work.

    Here's my event viewer logs.

    Application: GYFM3.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.Runtime.InteropServices.COMException
       at MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef)
       at MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager()
       at MS.Win32.Penimc.UnsafeNativeMethods..cctor()
    
    Exception Info: System.TypeInitializationException
       at MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr ByRef)
       at System.Windows.Input.PenThreadWorker..ctor()
       at System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(System.Windows.Input.PenContext)
       at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl()
       at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets()
       at System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor()
       at System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices()
       at System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(System.Windows.Input.InputManager, System.Windows.PresentationSource)
       at System.Windows.Interop.HwndStylusInputProvider..ctor(System.Windows.Interop.HwndSource)
       at System.Windows.Interop.HwndSource.Initialize(System.Windows.Interop.HwndSourceParameters)
       at System.Windows.Window.CreateSourceWindow(Boolean)
       at System.Windows.Window.ShowHelper(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Application.RunDispatcher(System.Object)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at GYFM2.App.Main()
    
    [/code:1zldf0om]
    [code:1zldf0om]
    Faulting application name: GYFM3.exe, version: 3.0.0.0, time stamp: 0x58e486a7
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.23807, time stamp: 0x5915fe14
    Exception code: 0xe0434352
    Fault offset: 0x000000000001a06d
    Faulting process id: 0x1454
    Faulting application start time: 0x01d2ed01e34f0b56
    Faulting application path: C:\Users\Me\Desktop\GiveYourFontsMono_v3_0\GYFM3.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: 2138fde5-58f5-11e7-93d1-fcaa142817c6
    [/code:1zldf0om]
    Lastly, here's the actual report.wer file:
    [code:1zldf0om]
    Version=1
    EventType=CLR20r3
    EventTime=131427931516054441
    ReportType=2
    Consent=1
    ReportIdentifier=2138fde6-58f5-11e7-93d1-fcaa142817c6
    IntegratorReportIdentifier=2138fde5-58f5-11e7-93d1-fcaa142817c6
    Response.type=4
    Sig[0].Name=Problem Signature 01
    Sig[0].Value=GYFM3.exe
    Sig[1].Name=Problem Signature 02
    Sig[1].Value=3.0.0.0
    Sig[2].Name=Problem Signature 03
    Sig[2].Value=58e486a7
    Sig[3].Name=Problem Signature 04
    Sig[3].Value=PresentationCore
    Sig[4].Name=Problem Signature 05
    Sig[4].Value=4.7.2053.0
    Sig[5].Name=Problem Signature 06
    Sig[5].Value=58fa7581
    Sig[6].Name=Problem Signature 07
    Sig[6].Value=46a2
    Sig[7].Name=Problem Signature 08
    Sig[7].Value=16
    Sig[8].Name=Problem Signature 09
    Sig[8].Value=PSZQOADHX1U5ZAHBHOHGHLDGIY4QIXHX
    DynamicSig[1].Name=OS Version
    DynamicSig[1].Value=6.1.7601.2.1.0.256.1
    DynamicSig[2].Name=Locale ID
    DynamicSig[2].Value=1033
    DynamicSig[22].Name=Additional Information 1
    DynamicSig[22].Value=c8a9
    DynamicSig[23].Name=Additional Information 2
    DynamicSig[23].Value=c8a921356b5dc80c39107be055579326
    DynamicSig[24].Name=Additional Information 3
    DynamicSig[24].Value=9ed8
    DynamicSig[25].Name=Additional Information 4
    DynamicSig[25].Value=9ed84c2f930fc23a0593eaf6efed34a4
    UI[2]=C:\Users\Me\Desktop\GiveYourFontsMono_v3_0\GYFM3.exe
    UI[3]=GiveYourFontsMono has stopped working
    UI[4]=Windows can check online for a solution to the problem.
    UI[5]=Check online for a solution and close the program
    UI[6]=Check online for a solution later and close the program
    UI[7]=Close the program
    LoadedModule[0]=C:\Users\Me\Desktop\GiveYourFontsMono_v3_0\GYFM3.exe
    LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
    LoadedModule[2]=C:\Windows\SYSTEM32\MSCOREE.DLL
    LoadedModule[3]=C:\Program Files\AVAST Software\Avast\x64\aswhooka.dll
    LoadedModule[4]=C:\Windows\system32\KERNEL32.dll
    LoadedModule[5]=C:\Windows\system32\KERNELBASE.dll
    LoadedModule[6]=C:\Windows\system32\ADVAPI32.dll
    LoadedModule[7]=C:\Windows\system32\msvcrt.dll
    LoadedModule[8]=C:\Windows\SYSTEM32\sechost.dll
    LoadedModule[9]=C:\Windows\system32\RPCRT4.dll
    LoadedModule[10]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
    LoadedModule[11]=C:\Windows\system32\SHLWAPI.dll
    LoadedModule[12]=C:\Windows\system32\GDI32.dll
    LoadedModule[13]=C:\Windows\system32\USER32.dll
    LoadedModule[14]=C:\Windows\system32\LPK.dll
    LoadedModule[15]=C:\Windows\system32\USP10.dll
    LoadedModule[16]=C:\Windows\system32\IMM32.DLL
    LoadedModule[17]=C:\Windows\system32\MSCTF.dll
    LoadedModule[18]=C:\Windows\system32\VERSION.dll
    LoadedModule[19]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
    LoadedModule[20]=C:\Windows\system32\MSVCR120_CLR0400.dll
    LoadedModule[21]=C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\a45ddc8333a6ec85275f9c44732ffb5d\mscorlib.ni.dll
    LoadedModule[22]=C:\Windows\system32\ole32.dll
    LoadedModule[23]=C:\Windows\system32\CRYPTBASE.dll
    LoadedModule[24]=C:\Windows\system32\uxtheme.dll
    LoadedModule[25]=D:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll
    LoadedModule[26]=C:\Windows\system32\OLEAUT32.dll
    LoadedModule[27]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System\6ada715406970ca9c23b97933fa5882d\System.ni.dll
    LoadedModule[28]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Core\a472cc54a14423ce444e8c0176bd4437\System.Core.ni.dll
    LoadedModule[29]=C:\Windows\assembly\NativeImages_v4.0.30319_64\WindowsBase\362eb0a9213fb4f98ac5e680a1f93f83\WindowsBase.ni.dll
    LoadedModule[30]=C:\Windows\system32\CRYPTSP.dll
    LoadedModule[31]=C:\Windows\system32\rsaenh.dll
    LoadedModule[32]=C:\Windows\assembly\NativeImages_v4.0.30319_64\PresentationCore\b32e3ef201b989d72bcd9171201eee7e\PresentationCore.ni.dll
    LoadedModule[33]=C:\Windows\assembly\NativeImages_v4.0.30319_64\Presentatio5ae0f00f#\993779c6c20bddfda695dd492fffb5c6\PresentationFramework.ni.dll
    LoadedModule[34]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Xaml\554d3abf898812696e72f49c6978d3e8\System.Xaml.ni.dll
    LoadedModule[35]=C:\Windows\system32\dwrite.dll
    LoadedModule[36]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\wpfgfx_v0400.dll
    LoadedModule[37]=C:\Windows\system32\MSVCP120_CLR0400.dll
    LoadedModule[38]=C:\Windows\system32\D3DCOMPILER_47.dll
    LoadedModule[39]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationNative_v0400.dll
    LoadedModule[40]=C:\Windows\system32\api-ms-win-core-xstate-l2-1-0.dll
    LoadedModule[41]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
    LoadedModule[42]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
    LoadedModule[43]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Configuration\dc7f7adbf7c62800a126982c0c2b3c73\System.Configuration.ni.dll
    LoadedModule[44]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Xml\9a2cca41e593d07a4637cffaad98d37e\System.Xml.ni.dll
    LoadedModule[45]=C:\Windows\system32\dwmapi.dll
    LoadedModule[46]=C:\Windows\system32\RpcRtRemote.dll
    LoadedModule[47]=C:\Windows\system32\d3d9.dll
    LoadedModule[48]=C:\Windows\system32\d3d8thk.dll
    LoadedModule[49]=C:\Windows\system32\nvd3dumx.dll
    LoadedModule[50]=C:\Windows\system32\WINMM.dll
    LoadedModule[51]=C:\Windows\system32\Shell32.dll
    LoadedModule[52]=C:\Windows\system32\nvspcap64.dll
    LoadedModule[53]=C:\Windows\system32\SETUPAPI.dll
    LoadedModule[54]=C:\Windows\system32\CFGMGR32.dll
    LoadedModule[55]=C:\Windows\system32\DEVOBJ.dll
    LoadedModule[56]=C:\Windows\system32\PSAPI.DLL
    LoadedModule[57]=C:\Windows\system32\WINHTTP.dll
    LoadedModule[58]=C:\Windows\system32\webio.dll
    LoadedModule[59]=C:\Windows\system32\WTSAPI32.dll
    LoadedModule[60]=C:\Windows\system32\profapi.dll
    LoadedModule[61]=C:\Windows\system32\nvapi64.dll
    LoadedModule[62]=C:\Windows\system32\igdumdim64.dll
    LoadedModule[63]=C:\Windows\assembly\NativeImages_v4.0.30319_64\Presentatio1c9175f8#\0c08bbe87768b9329ad56b23249fcd3e\PresentationFramework.Aero.ni.dll
    LoadedModule[64]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Drawing\16c33d498603d75f08c958f31ac7feb5\System.Drawing.ni.dll
    LoadedModule[65]=C:\Windows\system32\WindowsCodecs.dll
    LoadedModule[66]=C:\Windows\system32\WINSTA.dll
    LoadedModule[67]=C:\Windows\system32\CLBCatQ.DLL
    LoadedModule[68]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll
    FriendlyEventName=Stopped working
    ConsentKey=CLR20r3
    AppName=GiveYourFontsMono
    AppPath=C:\Users\Me\Desktop\GiveYourFontsMono_v3_0\GYFM3.exe
    
    [/code:1zldf0om]
  • Ahh I see, so it has already been narrowed down to that single instance, therefore no other picks will work because there is only one in the pick. Each pick would theoretically narrow the list the further down one goes in a chain; I was under the impression every time I use a Pick it starts 100% fresh no matter the code hierarchy.

    Thank you for explaining it step by step. I learned a lot.

    I ended up solving the problem by calling functions to increase/decrease the size.

  • I need help with this code. It finds a Hotkey instance with an associated ID and switches that found hotkey to the current selected one, but...

    The highlighted area is where the problem is. For whatever reason this fails the Pick check, despite debug mode telling me that that particular Hotkey instance exists (at startup, this ID always calculates to 1):

    Is there something I'm doing wrong with these nested Picks? I can't figure it out or continue coding, it's driving me nuts! ( ???)

    Also, no matter whether CURRENT_HOTKEY is +1, -1, or anything other than just the variable itself, it does not pick the object correctly despite the fact there are 10 hotkeys with IDs 1-10.

  • You could make a sprite, make it solid, and set it to invisible. You could us the same sprite repeatedly or use several depending on your collision shape needs. I don't make these type of games but seems to me this would work fine, placing the invisible sprites on the uppermost layer. I would also disable collisions on all visible tiles or sprites which would save memory. Hope this helps.

    So if I understanding right, I would use an invisible sprite with solid to go over places in the lower part like water, buildings and etc. ?

    As for disabling collision on tiles, how would I do that?

  • Hi there, I'm a little confused about the collision for tilemaps on different layers.

    I understand that if two tile maps are on top of each other, the bottom one has zero collision? This is the thing I am having trouble with.

    I am wondering if it is possible to have an RPG Maker-like tile setup where a layout has the "lower tile" layer and the "upper tile" layer- where the "lower tile" has water, mountains and such, basically filled tiles. Then the "upper" is decorations like windows, rocks stuff that has transparent pixels.

    I've tried to emulate this with having 2 layers, a tilemap with "lower tiles" on it and another one with "upper tiles." The problem lies with this "zero collision" . I will place water , mountains or buildings like that on the "lower tile" but because of this overlapping tilemap collision , my player can walk through those tiles like they are Jesus. I then think "well put the water/buildings on upper" but that also means that I wouldn't be able to put decorations on that like windows or water lilies because they are on the same tile map layer and overwrite each other!

    Is there a way to accomplish what I'm looking for? I'm not sure how to solve my issue.

    EDIT: for some reason a lot of words got removed in my post, fixed.

  • Hello.

    I am making an interactive map. When the mouse hovers over 4 "hitboxes" (n, s, e, w) the map is supposed to move in that direction. However I can't for the life of me figure out how to move objects without them physically rotating. I want the map to move east when I'm hovering over the east hitbox (I guess that is a 0 degree angle?), but I can't make it go to that angle without the map turning on its side.

    I tried several things before the hitbox idea (pinning, scrollto, bullets) but I think this is closest to what I want, I just don't know how to move an object without it turning towards that angle.

    What I'm using right now is a simple:

    if mouse over hitbox
       Set angle to (whatever) degrees
       Move forward 2 pixels[/code:rpclc47j]
    
    But setting it to, say, 270, makes the whole map flip on its side.
  • Completely understandable and thank you for the tips, hopefully I'll be able to work out something as well.

mimiha's avatar

mimiha

Member since 5 Feb, 2016

None one is following mimiha yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies