R0J0hound's Recent Forum Activity

  • [quote:2py1z69r]What's different between "objA._value" and "objA[0]._value" in this case?

    objA is the class to access objA instances and exists for the duration of the application. objA[0] creates a temporary class to access that instance.

    Here is a fix:

    Add this code to 'Start of Layout' before you run any other code to be able to attach new members to instances.

    class _instance_values:
    	pass
    
    _Instances._vals_=dict()
    for _ot in _Instances.__dict__.items():
    	if _ot[0][0]=='_':
    		continue
    	_ot[1]._oldgetattr=_ot[1].__getattr__
    	def mygetattr(this, attr):
    		objkey=this.__dict__['__instance__']
    		if _Instances._vals_.has_key(objkey):
    			if hasattr(_Instances._vals_[objkey],attr):
    				return getattr(_Instances._vals_[objkey],attr)
    		return this._oldgetattr(attr)
    	_ot[1].__getattr__=mygetattr
    	
    	_ot[1]._oldsetattr=_ot[1].__setattr__
    	def mysetattr(this, attr, value):
    		objkey=this.__dict__['__instance__']
    		if not _Instances._vals_.has_key(objkey):
    			_Instances._vals_[objkey]=_instance_values()
    		if not hasattr(this.__class__, attr) and attr not in this.__class__._otherAttrib:
    				return setattr(_Instances._vals_[objkey], attr, value)
    		return this._oldsetattr(attr,value)
    	_ot[1].__setattr__=mysetattr[/code:2py1z69r]
  • With the wait object it's a bug.

  • Are you using the OR condition at all in layout 3?

  • Do something like this:

    import random
    random.choice(Sprite).angle+=1[/code:2q52df0n]
    
    When using python you can't pick objects like with conditions.  You'll have to use traditional programming to do it.  You can however access what objects are selected by events with SOL.Sprite.
  • Well, it appears that looplength just returns the end number of the loop. Loopindex will return the currently processed loop number.

    ex:

    for 1 to 5

    1,2,3,4,5

    for 1 to -2

    1,0,-1,-2

    for 0 to 3

    0,1,2,3

  • [quote:1bw51e8y]Shouldn't he just be using time delta?

    If he wants to. That is another way to achieve the same result.

  • Construct uses the vs2005 runtime because it was compiled with Visual Studio 2005. This does not make it outdated since Microsoft still supports it releasing security fixes and patches for it on a regular basis.

    When installing construct the latest version of the vc2005 runtime is installed. This is the version used, which was released 4/11/2011, much newer than MSXML 4.0 SP3 which was released 9/29/2009.

    Are you sure that security vulnerability is still current? The date on the page you linked to dates from 2008.

  • The wait object breaks picking with multiple instances. Use the timer behavior instead.

    http://dl.dropbox.com/u/5426011/examples5/timerEx.cap

    made in cc1.2

  • A solution would be to have an additional object with the physics behavior paired up with the objects with the rts behavior. Then just have the physics objects chase the rts object.

    http://dl.dropbox.com/u/5426011/example ... hysics.cap

    made in cc1.2

    You just have to tweak the settings to get the behavior you want.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll have to look into it but it seems that CreateRelObjIP is indeed missing a parameter.

    Try this to do exactly what CreateRelObjIP would do.

    System.Create("Sprite", 1, Sprite2[1].ImagePointX("point"), Sprite2[1].ImagePointY("point"))[/code:1aur1a40]
  • I have tested it as working with my Audiere plugin. The only other plugin I know of that appears to use this feature is the mod plugin.

  • If the animation frames start with right then go clockwise this formula will work:

    round(angle(.x, .y, mousex, mousey)/45)%8+1

    You can also setup animation angles so that when you point an object to a point construct will automatically select the closest angle.

    Here is two ways to do it:

    http://dl.dropbox.com/u/5426011/examples5/lookat.cap

    made in cc1.2

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound