X3M's Recent Forum Activity

  • An online parser for the event sheets XML files would be great. You just upload Eventsheet.xml to the server, then you get a table like bbcode that you can paste in the forums.

  • Where did you put this WaitForCorrectAnswers(num) function ? I can't help you further if you don't post the full runtime script.

    Here is a hint, this function cannot be called anywhere, it should be inside an instanceProto

  • You do not have permission to view this post

  • You can achieve that if you use a physics behaviour instead of the platformer behaviour, apply impulse of 10 for example if the Right key is down, and apply impulse of -10 if the Left key is down. Set the ground friction to a value between 0.1 and 0.3.

    You'll notice that when you switch from Left key press to Right key press while sliding, the player wont switch direction immediatly, instead he will keep sliding for a second then slowly gain momentum to the desired side.

    I've tried it before and it worked for me, but you will encounter some problems with slopes.

  • You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way.

    Download the stable release => https://www.scirra.com/construct2/releases/r233

  • >

    > The deadline is : 31st August.

    >

    >

    Thanks It's 31st August? We have 10th of September today, so this one is over? Or it's annuall and now the deadline is 31st August 2017?

    Oops, my bad, seems like it ended at 31st August 2016.

  • Here is another contest with the same prize of 10.000 $ : http://adoptmygame.com

    The deadline is : 31st August.

    The good thing is that there will be portal owners and investors watching.

    Good luck to everyone and thanks for the info

  • Pretty sure that would be dis.yourMom

    Glad you're good sport, between I've just noticed that you're also a member of the FGL community.

  • What is this useful for? Just curious. The manual mentions the relevant ones, whereas much of the rest are helper functions used by the runtime that isn't useful to a plugin dev.

    They are useful if you are not using the c2canvas like I'm doing.

    I think he was just doing this.kitchenSink.

    No I was just doing this.yourMom.

    • this.

      • Members:

        type,runtime,recycled,uid,puid,iid,get_iid,toString,extra,instance_var_names,instance_vars,behavior_insts,properties,is_contained,siblings

      • Functions:

        get_iid,toString,onCreate,tick,tick2,onDestroy,saveToJSON,loadFromJSON,draw,drawGL,getDebuggerValues,onDebugValueEdited

    • this.type.

      • Members:

        plugin,runtime,name,is_family,instvar_sids,vars_count,behs_count,fx_count,sid,members,family_index,families, family_var_map,family_beh_map,family_fx_map,is_contained,container,texture_file,texture_filesize,texture_pixelformat, animations,index,instances,deadCache,solstack,cur_sol,default_instance,default_layerindex,stale_iids,updateIIDs,collision_grid,any_cell_changed,any_instance_parallaxed,extra,toString,behaviors,global,isOnLoaderLayout,effect_types,tile_poly_data

      • Functions:

        updateIIDs,getFirstPicked,getPairedInstance,getCurrentSol,pushCleanSol,pushCopySol,popSol,getBehaviorByName,getBehaviorIndexByName,getEffectIndexByName,applySolToContainer,getInstanceByIID,toString,onCreate

    • this.runtime

      • Members:

        isCrosswalk,isCordova,isPhoneGap,isDirectCanvas,isAppMobi,isCocoonJs,isEjecta,isDomFree,isMicrosoftEdge,isIE,isTizen, isAndroid,isiPhone,isiPad,isiOS,isiPhoneiOS6,isChrome,isAmazonWebApp,isFirefox,isSafari,isWindows,isNWjs,isNodeWebkit, isArcade,isWindows8App,isWindows8Capable,isWindowsPhone8,isWindowsPhone81,isWindows10,isWinJS,isBlackberry10, isAndroidStockBrowser,devicePixelRatio,isMobile,isWKWebView,httpServer,httpServerUrl,isDebug,canvas,canvasdiv, gl,glwrap,glUnmaskedRenderer,enableFrontToBack,earlyz_index,ctx,fullscreenOldMarginCss,firstInFullscreen,oldWidth, oldHeight,width,height,draw_width,draw_height,cssWidth,cssHeight,lastWindowWidth,lastWindowHeight,forceCanvasAlpha, redraw,isSuspended,plugins,types,types_by_index,behaviors,layouts,layouts_by_index,eventsheets,eventsheets_by_index, wait_for_textures,triggers_to_postinit,all_global_vars,all_local_vars,solidBehavior,jumpthruBehavior,shadowcasterBehavior, deathRow,hasPendingInstances,isInClearDeathRow,isInOnDestroy,isRunningEvents,isEndingLayout,createRow,isLoadingState, saveToSlot,loadFromSlot,loadFromJson,lastSaveJson,signalledContinuousPreview,suspendDrawing,fireOnCreateAfterLoad,dt, dt1,minimumFramerate,logictime,cpuutilisation,rendertime,rendercpu,eventstime,eventscpu,timescale,kahanTime,wallTime, last_tick_time,fps,last_fps_time,tickcount,execcount,framecount,objectcount,collisioncheck_count,collisioncheck_sec, polycheck_count,polycheck_sec,movedcell_count,movedcell_sec,movedrendercell_count,movedrendercell_sec,physics_cpu, hit_breakpoint,step_break,resuming_breakpoint,breakpoint_event,breakpoint_action,breakpoint_condition,changelayout, destroycallbacks,event_stack,event_stack_index,localvar_stack,localvar_stack_index,trigger_depth,loop_stack, loop_stack_index,next_uid,next_puid,layout_first_tick,family_count,suspend_events,raf_id,timeout_id,isloading, loadingprogress,isNodeFullscreen,stackLocalCount,audioInstance,had_a_click,isInUserInputEvent,objects_to_pretick, objects_to_tick,objects_to_tick2,registered_collisions,temp_poly,temp_poly2,allGroups,groups_by_name,cndsBySid, actsBySid,varsBySid,blocksBySid,running_layout,layer_canvas,layer_ctx,layer_tex,layout_tex,layout_canvas, layout_ctx,is_WebGL_context_lost,uses_background_blending,fx_tex,fullscreen_scaling,files_subfolder,objectsByUid, loaderlogos,snapshotCanvas,snapshotData,objectRefTable,name,first_layout,fullscreen_mode,fullscreen_mode_set, original_width,original_height,parallax_x_origin,parallax_y_origin,uses_loader_layout,loaderstyle,system, audio_to_preload,pixel_rounding,aspect_scale,enableWebGL,linearSampling,alphaBackground,versionstr,useHighDpi, orientations,autoLockOrientation,pauseOnBlur,wantFullscreenScalingQuality,fullscreenScalingQuality,downscalingQuality, preloadSounds,projectName,start_time,isRetina,overlay_canvas,overlay_ctx,tickFunc,progress,last_progress

      • Functions:

        tickFunc,requestProjectData,initRendererAndLoader,setSize,tryLockOrientation,onContextLost,onContextRestored, positionOverlayCanvas,setSuspended,addSuspendCallback,GetObjectReference,loadProject,waitForImageLoad, findWaitingTexture,getready,areAllTexturesAndSoundsLoaded,go,draw_c2_splash_loader,go_loading_finished, tick,logic,onWindowBlur,doChangeLayout,runLayoutChangeMethods,pretickMe,unpretickMe,tickMe,untickMe,tick2Me, untick2Me,getDt,draw,drawGL,addDestroyCallback,removeDestroyCallback,getObjectByUID,DestroyInstance,ClearDeathRow, IterateDeathRow,ClearDeathRowForType,ClearDeathRowForSingleInstance,createInstance,createInstanceFromInit, getLayerByName,getLayerByNumber,getLayer,clearSol,pushCleanSol,pushCopySol,popSol,updateAllCells, getCollisionCandidates,getTypesCollisionCandidates,getSolidCollisionCandidates,getJumpthruCollisionCandidates, testAndSelectCanvasPointOverlap,testOverlap,testTilemapOverlap,testRectOverlap,testSegmentOverlap,typeHasBehavior, typeHasNoSaveBehavior,typeHasPersistBehavior,getSolidBehavior,getJumpthruBehavior,testOverlapSolid,testRectOverlapSolid, testOverlapJumpThru,pushOutSolid,pushOut,pushInFractional,pushOutSolidNearest,registerCollision,checkRegisteredCollision,c alculateSolidBounceAngle,trigger,triggerOnSheet,triggerOnSheetForTypeName,executeSingleTrigger,getCurrentCondition, getCurrentConditionObjectType,isCurrentConditionFirst,getCurrentAction,pushLocalVarStack,popLocalVarStack, getCurrentLocalVarStack,pushEventStack,popEventStack,getCurrentEventStack,pushLoopStack,popLoopStack,getCurrentLoop, getEventVariableByName,getLayoutBySid,getObjectTypeBySid,getGroupBySid,doCanvasSnapshot,debugBreak,debugResume, signalContinuousPreview,stepIfPausedInDebugger,handleSaveLoad,saveToJSONString,refreshUidMap,loadFromJSONString, saveInstanceToJSON,getInstanceVarIndexBySid,getBehaviorIndexBySid,loadInstanceFromJSON,fetchLocalFileViaCordova, fetchLocalFileViaCordovaAsText,fetchLocalFileViaCordovaAsArrayBuffer,fetchLocalFileViaCordovaAsURL,setImageSrc

  • You do not have permission to view this post

  • Here are some functions that I use to draw shapes on the Construct 2 renderer.

    Box:

    renderSquare(this, renderer,cr.RGB(0,0,255));[/code:3573wm0c]
    [code:3573wm0c]function renderSquare(inst, renderer,color) {
    	var q = inst.instance.GetBoundingQuad();
    	renderer.Outline(q, color);
    }[/code:3573wm0c]
    Circle:
    [code:3573wm0c]renderCircle(this, renderer,cr.RGB(0,0,0),18);[/code:3573wm0c]
    [code:3573wm0c]
    function renderCircle(inst, renderer, color,segments) {
    	var q = inst.instance.GetBoundingQuad();
    	var xpos = (q.tlx + q.trx + q.blx + q.brx) / 4;
    	var ypos = (q.tly + q.try_ + q.bly + q.bry) / 4;
    	xsto = new cr.vector2(inst.instance.GetSize().x / 2, 0);
    	ysto = new cr.vector2(inst.instance.GetSize().y / 2, 0);
    	rcos = Math.cos((Math.PI / (segments/2)))
    		rsin = Math.sin((Math.PI / (segments/2)))
    		for (var i = 0; i < segments; i++) {
    			xsto.x = ysto.x * rcos - ysto.y * rsin;
    			xsto.y = ysto.x * rsin + ysto.y * rcos;
    			renderer.Line(new cr.vector2(xpos + xsto.x, ypos + xsto.y), new cr.vector2(xpos + ysto.x, ypos + ysto.y), color);
    			q.tlx = xpos + xsto.x;
    			q.tly = ypos + xsto.y;
    			q.trx = xpos + ysto.x;
    			q.try_ = ypos + ysto.y;
    			q.blx = xpos;
    			q.bly = ypos;
    			q.brx = xpos;
    			q.bry = ypos;
    			ysto = new cr.vector2(xsto.x, xsto.y);
    		}
    }
    [/code:3573wm0c]
    Polyline:
    [code:3573wm0c]drawPolyline("641 96 435 99 434 186 634 181 641 95 688 45 689 138 633 180 435 98 513 50 688 45",cr.RGB(255, 0, 0), this.instance,renderer);[/code:3573wm0c]
    [code:3573wm0c]function drawPolyline(points,color, inst,rend) 
    {
    			var q = inst.GetBoundingQuad();
    			var xpos = (q.tlx + q.trx + q.blx + q.brx) / 4;
    			var ypos = (q.tly + q.try_ + q.bly + q.bry) / 4;
    			var fq = new cr.quad;
    			var diffx,diffy;
    			var pArray = [];
    			pArray = points.split(" ");
    			if (xpos > pArray[0]) {
    				diffx = xpos - pArray[0];
    				diffx *= -1;
    			} else {
    				diffx = pArray[0] - xpos;
    			}
    			if (ypos > pArray[1]) {
    				diffy = ypos - pArray[1];
    				diffy *= -1;
    			} else {
    				diffy = pArray[1] - ypos;
    			}
    			for (var i = 0; i < pArray.length; i += 2) {
    				rend.Line(new cr.vector2(pArray[i] - diffx, pArray[i + 1] - diffy), new cr.vector2(pArray[i + 2] - diffx, pArray[i + 3] - diffy), color);
    			}
    
    }[/code:3573wm0c]
    
    You may find these useful when making your own plugins.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
X3M's avatar

X3M

Member since 8 Jul, 2016

Twitter
X3M has 1 followers

Trophy Case

  • 8-Year Club
  • Coach One of your tutorials has over 1,000 readers

Progress

9/44
How to earn trophies