When fixing x,y to x#,y# make sure you get DamageTile in players.bb. This was causing some objects to not (or incorrectly) destruct on destruction.
New scripting commands for today:
+message(message) - shows message using robs messenger
+setobject(id) - sets the current tile's object to id
+setobject(x,y,id) - sets the tile object at x,y to id
+givefullmap() - 'vis-es' the entire map. Handy for a pick up to show the whole level!
I haven't uploaded a new test.map with these examples yet, I'm sure you can add them in though Rob (if you understood my explanation of objects!). For example a switch with an onaction trigger of setobject(44,44,1) creates ammo at tile 44,44. Handy!
All you need is...this in the RunScript select statement.
New scripting commands for today:
+message(message) - shows message using robs messenger
+setobject(id) - sets the current tile's object to id
+setobject(x,y,id) - sets the tile object at x,y to id
+givefullmap() - 'vis-es' the entire map. Handy for a pick up to show the whole level!
I haven't uploaded a new test.map with these examples yet, I'm sure you can add them in though Rob (if you understood my explanation of objects!). For example a switch with an onaction trigger of setobject(44,44,1) creates ammo at tile 44,44. Handy!
All you need is...this in the RunScript select statement.
Case "message" messenger(si\param,3000) Case "setobject" pos=Instr(si\param,",") If pos=0 Then id=si\param xx#=x#:yy#=y# Else xx#=Int(Left(si\param,pos-1))*32 pos2=Instr(si\param,",",pos+1) yy#=Int(Mid(si\param,pos+1,pos2-pos))*32 id=Mid(si\param,pos2+1) End If DebugLog xx#+","+yy#+","+id puttile(xx#,yy#,LayerObject,id) Case "givefullmap" ClearVis(1)and in map.bb update ClearVis
Function ClearVis(value=0) ;set initial visibility for all tiles to none at all ;we'll set initial player vis when we create the player For x=0 To 255 For y=0 To 255 map(x,y,LAYER_VISIBLE)=value Next Next End Function