Objective: Create a new "Pistol" class weapon which will only spawn once to the map. Any player can press "H", then collect it to use it. (To replace standard pistol.)
The device would use 0 bullets, have 1 in the clip and have a max ammo of one. This would allow the gun to actually "Fire", but not recharge with bullets.
A new bullet type would be needed. Producing a new bullet type in the form of something like Portal_bullet.tik would allow the gun to reference the special "portal bullet". Inside this .tik file would be some form of script which would call a teleport and teledest into existance, with targetnames that are targeted by one another.
The reason it needs to be a pistol is so there can be an entrace (Primary attack) and exit (Secondary).
Code: Select all
Primary attack would make:
$targename portal_in
target portal_out
Secondary would make:
$targename portal_outPhysics note: The MOHAA game will not conserve physical velocity. I made a teleport at the bottom of a tall platform and made a teledest point up. Although some of the momentum did reflect, it was no more than one and a half normal jump hieght. This was constant, no matter how high the initial fall.





