Problem with potatogun
sv_cheats 1
give_player_portalgun
upgrade_portalgun
Then i played the level, and somehow i also have a potato on my gun. I did not use the command: give_player_potatogun
Then i deleted the level COMPLETELY (deleted the files too) and made a new level with the same name. Now when i spawn i already has a POTATOgun even without placing a portalgun in my map... Wth?
Can anyone help me out here...
In the Console i can see it says
=======================Trying to GivePlayerPortalgun
=======================Trying to UpgradePlayerPortalgun
=======================Trying to UpgradePlayerPotatogun
When i load the map.
EDIT: I found out how to remove it: Using the playerproxy... but this doesnt explain why it still tries to put a potatogun to the player
That automatically gives the Potato Gun, unless you modify the script it works using.
There: sv_cheats 1 > impulse 200 > give weapon_potralgun > upgrade_potralgun.
And search first next time.
I swear that thread should be stickied
Yeah have a look at this post there:
KennKong wrote:
DO NOT USE THE ATTACHED FILE IN YOUR PORTAL2 HEIRARCHY! IT WILL BREAK YOUR GAME!!!
The attached file has a .txt extension, it must be changed to .nut to work.I created a custom mod to run my single player custom maps. I have modified the \scripts\vscripts\transitions\sp_transition_list.nut file to support additional features.
- Allows series of maps to be added which will be played in order, returning to the menu after the last one.
- Controls which gun a map starts with (if the map doesn't do it itself).
When I add maps to my custom mod, I will update this file to make it start with the right portal gun if the map doesn't do it itself. I may add custom titles if the map doesn't have them (an original Valve feature). I can use this file to create series of maps, if they don't change maps themselves.
This file is provided only as an example. Use it for ideas on creating your own. Let me know if there are obvious bugs in this one, and if you have any ideas for improving it.
If you load a map called sp_* via the normal menu it will automaticly load a script. This script gives you a PotatOS Portalgun.
There is an entity called "player proxy" or something like that. It has an input that removes the potato from your Portalgun.
You can remove the potato with...
Add 2 entities to your map:
1) logic_playerproxy, give it a name, like 'PlayerOptions'
2) logic_auto
In the logic_auto, add an output:
MyOutput: OnMapSpawn
Target Entity: PlayerOptions
Via this input: RemovePotatosFromPortalgun
Delay: 0.5
The Delay is important.
HTHs,
Rob.
Thank you Skotty
And thank you all for solutions...