*NEW* 14.2 Lava Walls
With that, you cant walk on lava.
This involve modify the isWalkable() check in Player.class, the same you should modify for No-clip.
This method is _-cJ !
Make sure the beginning of this method looks like this
This involve modify the isWalkable() check in Player.class, the same you should modify for No-clip.
This method is _-cJ !
Make sure the beginning of this method looks like this
Code:
trait method QName(PackageNamespace("", "#0"), "_-cJ")
method
refid "com.company.assembleegameclient.objects:Player/_-cJ"
param QName(PackageNamespace("", "#0"), "Number")
param QName(PackageNamespace("", "#0"), "Number")
returns QName(PackageNamespace("", "#0"), "Boolean")
body
maxstack 6
localcount 8
initscopedepth 7
maxscopedepth 8
code
pushfalse
pushtrue
setlocal 6
setlocal 7
getlocal0
pushscope
getlex QName(PackageNamespace("", "#0"), "map_")
getlocal1
getlocal2
callproperty QName(PackageNamespace("", "#0"), "getSquare"), 2
coerce QName(PackageNamespace("com.company.assembleegameclient.map"), "Square")
setlocal3
;-------------------------
; NOWALK ON LAVA
;-------------------------
;First we need to make sure the Square name contains Lava
getlocal3
getproperty QName(PackageNamespace("", "#0"), "props_")
getproperty QName(PackageNamespace("", "#0"), "id_")
pushstring "Lava"
callproperty QName(Namespace("http://adobe.com/AS3/2006/builtin"), "search"), 1
pushint -1
ifeq SKIPNOWALK
;Now, we must test if the Square has an object on him.
;If obj_ is not null, it means there is a "bridge on the lava"
;In this case we DONT HAVE TO FORCE NOWALK since we can cross using the bridge
;If its another object than "Partial Red floor" we should be blocked.
getlocal3
getproperty QName(PackageNamespace("", "#0"), "obj_")
pushnull
ifne SKIPNOWALK
pushfalse ; set the square NonWalkable
returnvalue
; trace obj, only for debug
;findpropstrict QName(PackageNamespace("", "#0"), "trace")
;getlocal3
;getproperty QName(PackageNamespace("", "#0"), "obj_")
;callpropvoid QName(PackageNamespace("", "#0"), "trace"), 1
;Let the game do NOWALK checks
SKIPNOWALK:

