sprite covering the whole screen

Started by rulk, May 03, 2016, 03:38 PM

Previous topic - Next topic

MEGAMIND

not working i also tested on blank gamemode script still not working did all the things same way u guyzz told

MEGAMIND

a video maybe helpfull if u provide

KAKAN

Quote from: MEGAMIND on Jul 22, 2016, 04:56 PMa video maybe helpfull if u provide
@Megamind, set the textdraw according to your resolution.
oh no

DizzasTeR

@MEGAMIND, What I see in the screenshots you provided, squirrel_logo.jpg

VCMP only loads images of format .png and not .jpg

MEGAMIND

#34
ok thnx but plz if we proviede will be helpfull
=============================
know im really desup and giveup know i really need a video plzz

Stormeus

We're not implementing JPEG sprites. It's generally useless for games and a superfluous use of development time. Just convert your images.

MEGAMIND

will it work like in sebys video /exec s<-CreateSpritre...etc?

MEGAMIND

#37
i did this in my

C:\Users\Administrator\Desktop\Blank VCMP 0.4 Server 32(x86) - 05.05.2016\store\script\main.nut

GUIMemobox
Constructor GUIMemobox()
Constructor GUIMemobox(position, size, colour)
Parameter types: VectorScreen, VectorScreen, Colour
Constructor GUIMemobox(position, size, colour, flags)
Parameter types: VectorScreen, VectorScreen, Colour, int
Function AddLine(line)
Parameter types: string. Return type: void.
Function AddLine(line, colour)
Parameter types: string, Colour. Return type: void.
Function Clear()
Return type: void.
Property DisplayPos
Type: float
Property LineHeight
Type: int
Property LineCount (read-only)
Type: int
Property HistorySize
Type: int
Logo <- null;
Memo <- null;

function Script::ScriptLoad() {
    Logo = GUISprite( "images_logo.png", VectorScreen( 10, 10 ) );
    // Logo.Size = VectorScreen( Width, Height ) // You can resize the sprite
    Memo <- GUIMemobox( VectorScreen( 108, 700 ), VectorScreen( 10, 10 ), Colour( 255, 255, 255, 255 ) );
    Memo.AddLine( "hi all" );
    Memo.AddLine( "testing" );
}

server.cfg
plugins squirrel04rel32 xmlconf04rel32 announce04rel32 hashing04rel32 ini04rel32 mysql04rel32 sockets04rel32 sqlite04rel32


where is the problem????????

my pc screen resolutoion is 1280x1024 and game resolution is 640x480x32

Stormeus

Your problem is you keep pasting the documentation into your code when it doesn't do anything and isn't valid code.

Remove this:
GUIMemobox
Constructor GUIMemobox()
Constructor GUIMemobox(position, size, colour)
Parameter types: VectorScreen, VectorScreen, Colour
Constructor GUIMemobox(position, size, colour, flags)
Parameter types: VectorScreen, VectorScreen, Colour, int
Function AddLine(line)
Parameter types: string. Return type: void.
Function AddLine(line, colour)
Parameter types: string, Colour. Return type: void.
Function Clear()
Return type: void.
Property DisplayPos
Type: float
Property LineHeight
Type: int
Property LineCount (read-only)
Type: int
Property HistorySize
Type: int

MEGAMIND

Quote from: Stormeus on Jul 22, 2016, 06:44 PMYour problem is you keep pasting the documentation into your code when it doesn't do anything and isn't valid code.

Remove this:
GUIMemobox
Constructor GUIMemobox()
Constructor GUIMemobox(position, size, colour)
Parameter types: VectorScreen, VectorScreen, Colour
Constructor GUIMemobox(position, size, colour, flags)
Parameter types: VectorScreen, VectorScreen, Colour, int
Function AddLine(line)
Parameter types: string. Return type: void.
Function AddLine(line, colour)
Parameter types: string, Colour. Return type: void.
Function Clear()
Return type: void.
Property DisplayPos
Type: float
Property LineHeight
Type: int
Property LineCount (read-only)
Type: int
Property HistorySize
Type: int

but when i remove it it still doesnot works???? know wheres the problem

MEGAMIND

new question when in store\script\main.nut
function Script::ScriptLoad()
{
print( "Testing..." );
}

why in console it not showing this print in console do we have to link our scripts together do we have to link our main.nut with store\script\main.nut?

MEGAMIND

#41
OH THANKU SO MUCH I DONT KNOW HOW TO THANKU GUYZZZZ VCMP 0.4 ROCKSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS IT WORKED YEA....

sX <- GUI.GetScreenSize().X;
sY <- GUI.GetScreenSize().Y;

function Script::ScriptLoad()
{
Logo <- GUISprite( "Penguins.jpg", VectorScreen( 50, 50) );
Logo.Size = VectorScreen( sX, sY );
}

IT WORKED THANKS SPECIALLY TO @Doom_Kill3R

but  this is much better
Logo <- null;
function Script::ScriptLoad()
{
Logo <- GUISprite( "Penguins.ico", VectorScreen( 10, 200) );
} guess what it can work with any extension

i got them both working by this method sprite n textdraws
Memo <- null;
Logo <- null;
function Script::ScriptLoad()
{
  Memo <- GUIMemobox( VectorScreen( 1000, 500 ), VectorScreen( 100, 100 ), Colour( 255, 202, 202, 255 ) );
    Memo.AddLine( "hi testing" );
    Memo.AddLine( "Second line" );
Logo <- GUISprite( "Penguins.ico", VectorScreen( 10, 200) );
}

MEGAMIND

ok every thing is good but i dont need the box i onlu need text what should i do

Luis_Labarca

Quote from: MEGAMIND on Jul 22, 2016, 07:41 PMnew question when in store\script\main.nut
function Script::ScriptLoad()
{
print( "Testing..." );
}

why in console it not showing this print in console do we have to link our scripts together do we have to link our main.nut with store\script\main.nut?

hey bro also have the probe problem and I do not get anything on the console that needs to be done?
My server RP
IP: 51.222.28.159:8194

MEGAMIND