Jump to content

Recommended Posts

Posted

Hello ,I would like a code to change the map when I press a key . Also I have delete "triggerChangeMap" for my pc and how do I do to have it again ?

Thanks you ??

Posted

I would try something like:

function Script:UpdateWorld()
If window:KeyHit(Key.A) then

  changemapname=self.mapname

end


Here's the triggerChangeMap script.

--[[
This script will act as a trigger to change the current map.
Place this at the end of your map to make the player progress
to the next level.
]]--

Script.mapname=""--string "Map Name"

function Script:Start()
    self.enabled=true
end

function Script:Collision(entity, position, normal, speed)
    changemapname=self.mapname
end

function Script:Enable()--in
    if self.enabled==false then
        self.enabled=true
        self:CallOutputs("Enable")
    end
end

function Script:Disable()--in
    if self.enabled then
        self.enabled=false
        self:CallOutputs("Disable")
    end
end

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...