-
Notifications
You must be signed in to change notification settings - Fork 4
Useful Ahorn Scripts
JaThePlayer edited this page Jul 29, 2021
·
3 revisions
WARNING: Using any Ahorn scripts might break your map if you're not careful! I take no responsibility for what happens to your map after using any of these.
for room in loadedState.side.map.rooms
for entity in room.entities
if entity.name == "FrostHelper/IceSpinner"
entity.data["directory"] = "danger/FrostHelper/icecrystal", # change to what you want
entity.data["spritePathSuffix"] = "", # change to what you want
entity.data["destroyColor"] = "b0eaff", # change to what you want
entity.data["tint"] = "ffffff", # change to what you want
entity.data["bloomAlpha"] = 0.0, # change to what you want
entity.data["bloomRadius"] = 0.0, # change to what you want
entity.data["moveWithWind"] = false, # change to what you want
entity.data["dashThrough"] = false, # change to what you want
entity.data["rainbow"] = false, # change to what you want
entity.data["collidable"] = true, # change to what you want
end
end
end
for room in loadedState.side.map.rooms
for entity in room.entities
if entity.name == "spinner"
# create new spinner copying the old one
newSpinner = Entity("FrostHelper/IceSpinner", Dict{String,Any}(
"x" => entity.data["x"],
"y" => entity.data["y"],
"attachToSolid" => entity.data["attachToSolid"],
"destroyColor" => "b0eaff", # change to what you want
"directory" => "danger/FrostHelper/icecrystal", # change to what you want
"spritePathSuffix" => "", # change to what you want
"tint" => "ffffff", # change to what you want
"moveWithWind" => false, # change to what you want
"dashThrough" => false, # change to what you want
"bloomAlpha" => 0.0, # change to what you want
"bloomRadius" => 0.0, # change to what you want
"rainbow" => false, # change to what you want
"collidable" => true, # change to what you want
), entity.id)
push!(room.entities, newSpinner)
end
end
# remove all vanilla spinners
filter!(entity -> entity.name != "spinner", room.entities)
end
for room in loadedState.side.map.rooms
for entity in room.entities
if entity.name == "FrostHelper/IceSpinner"
# create new spinner copying the old one
newSpinner = Entity("spinner", Dict{String,Any}(
"x" => entity.data["x"],
"y" => entity.data["y"],
"attachToSolid" => entity.data["attachToSolid"],
"color" => "Blue", # change to what you want - can be Blue,Red,Purple,Rainbow
"dust" => false, # change to what you want
), entity.id)
push!(room.entities, newSpinner)
end
end
# remove all Custom Spinners
filter!(entity -> entity.name != "FrostHelper/IceSpinner", room.entities)
end