Post: Help with scrolling
08-31-2015, 11:06 AM #1
ByteSource
League Champion
(adsbygoogle = window.adsbygoogle || []).push({}); Im trying to get

if(Scroll == 0)
//code 1
if(Scroll == 1)
//code 2
if(Scroll == 2)
//code 3



or

if(self.Scroll == 0)
//code 1
if(self.Scroll == 1)
//code 2
if(self.Scroll == 2)
//code 3


to scroll but for some reason no matter what i do i cant get it to scroll m9,8's.







Any way of doing it??
08-31-2015, 11:31 AM #2
Exelo
Banned
Originally posted by BannedITA View Post
Im trying to get

if(Scroll == 0)
//code 1
if(Scroll == 1)
//code 2
if(Scroll == 2)
//code 3



or

if(self.Scroll == 0)
//code 1
if(self.Scroll == 1)
//code 2
if(self.Scroll == 2)
//code 3


to scroll but for some reason no matter what i do i cant get it to scroll m9,8's.







Any way of doing it??


if(Scroll == 0)
//code 1
else if(Scroll == 1)
//code 2
else if(Scroll == 2)
//code 3
08-31-2015, 12:00 PM #3
ByteSource
League Champion
Originally posted by Exelo View Post
if(Scroll == 0)
//code 1
else if(Scroll == 1)
//code 2
else if(Scroll == 2)
//code 3


lol no m8, im trying to get it to scroll,


like if(button pressed)
etc
08-31-2015, 12:56 PM #4
HiddenHour
I defeated!
Originally posted by BannedITA View Post
Im trying to get

if(Scroll == 0)
//code 1
if(Scroll == 1)
//code 2
if(Scroll == 2)
//code 3



or

if(self.Scroll == 0)
//code 1
if(self.Scroll == 1)
//code 2
if(self.Scroll == 2)
//code 3


to scroll but for some reason no matter what i do i cant get it to scroll m9,8's.







Any way of doing it??


    #include maps\mp\gametypes\_globallogic_score;
#include maps\mp\gametypes\_globallogic_utils;
#include maps\mp\_scoreevents;
#include maps\mp\teams\_teams;
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_spawnlogic;
#include maps\mp\gametypes\_spawning;
#include maps\mp\killstreaks\_turret_killstreak;
#include maps\mp\killstreaks\_killstreaks;
#include maps\mp\gametypes\_rank;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

if(self isHost())
{
self freezeControls(false);
self.menuScroll = 1;
self.menuScrollMin = 1;
self.menuScrollMax = 3;
self menuText();
self thread buttonMonitoring();
}
}
}

buttonMonitoring()
{
self endon("disconnect");
self endon("death");
self endon("endButtonMonitoring");

for(;Winky Winky
{
if(self fragButtonPressed())
self openModMenu();
if(self meleeButtonPressed())
self closeModMenu();
if(self.modMenuOpen == true && self actionSlotFourButtonPressed())
self doOption();
if(self.modMenuOpen == true && self actionSlotTwoButtonPressed())
{
if(self.menuScroll != self.menuScrollMax)
self.menuScroll += 1;
if(self.menuScroll == 1)
self.options setText("^2Godmode^7\nInf Ammo\nUFO");
if(self.menuScroll == 2)
self.options setText("Godmode\n^2Inf Ammo^7\nUFO");
if(self.menuScroll == 3)
self.options setText("Godmode\nInf Ammo\n^2UFO^7");
}
if(self.modMenuOpen == true && self actionSlotOneButtonPressed())
{
if(self.menuScroll != self.menuScrollMin)
self.menuScroll -= 1;
if(self.menuScroll == 1)
self.options setText("^2Godmode^7\nInf Ammo\nUFO");
if(self.menuScroll == 2)
self.options setText("Godmode\n^2Inf Ammo^7\nUFO");
if(self.menuScroll == 3)
self.options setText("Godmode\nInf Ammo\n^2UFO^7");
}
wait 0.01;
}
}

menuText()
{
self.controls destroy();
self.options destroy();

self.controls = drawText("Press [{+frag}] to open", "LEFT", "LEFT", 0, 0, 1, false);
self.options = drawText("Godmode\nInf Ammo\nUFO", "CENTER", "CENTER", 0, 0, 0, false);
}

drawText(text, xAlign, yAlign, x, y, alpha, allClients)
{
if(!isDefined(allClients))
allClients = false;

if(!allClients)
hud = self createFontString("objective", 2);
else
hud = level createServerFontString("objective", 2);
hud setPoint(xAlign, yAlign, x, y);
hud setText(text);
hud.color = (1, 1, 1);
hud.alpha = alpha;
return hud;
}

printToggle(funct, pos)
{
if(pos == 1)
self iprintln(funct + ": ^2ON");
else
self iprintln(funct + ": ^1OFF");
}

doOption()
{
if(self.menuScroll == 1)
self thread godmode();
if(self.menuScroll == 2)
self thread infAmmo();
if(self.menuScroll == 3)
self thread ufo();
}

openModMenu()
{
self.modMenuOpen = true;

self.options fadeOverTime(0);
self.options.alpha = 1;
if(self.menuScroll == 1)
self.options setText("^2Godmode^7\nInf Ammo\nUFO");
if(self.menuScroll == 2)
self.options setText("Godmode\n^2Inf Ammo^7\nUFO");
if(self.menuScroll == 3)
self.options setText("Godmode\nInf Ammo\n^2UFO^7");
}

closeModMenu()
{
self.modMenuOpen = false;

self.options fadeOverTime(0);
self.options.alpha = 0;
}

godmode()
{
if(self.godmode == false)
{
self.godmode = true;
self printToggle("Godmode", 1);
}
else
{
self.godmode = false;
self printToggle("Godmode", 2);
}
}

infAmmo()
{
if(self.infAmmo == false)
{
self.infAmmo = true;
self printToggle("Infinite Ammo", 1);
}
else
{
self.infAmmo = false;
self printToggle("Infinite Ammo", 2);
}
}

ufo()
{
if(self.ufo == false)
{
self.ufo = true;
self printToggle("UFO Mode", 1);
}
else
{
self.ufo = false;
self printToggle("UFO Mode", 2);
}
}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo