Jump to content

Change map when key pressed


GTkoi
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...