* Translator


Author Topic: Mapping and Scripting Problem Megathread  (Read 21703 times)

Ali Sajjad

  • Posts: 267
  • Country: pk
  • Respect: 4
  • A noob from earth!!!
Re: Mapping and Scripting Problem Megathread
« Reply #75 on: December 01, 2015, 03:43:44 PM »
Thanks. I would also love to know how to display a 3d text effect on screen.

I think you can make two or more text huds then slightly change their x or y position and alpha(or opacity whatever it is)/color to make it look like 3d

or

there can be better way. I don't know haha...
« Last Edit: December 01, 2015, 03:50:54 PM by Ali Sajjad »

Krish

  • The Challenger
  • Posts: 134
  • Country: gb
  • Respect: 6
  • Mostly playing CJ on FNRP Servers.
    • My Channel
Re: Mapping and Scripting Problem Megathread
« Reply #76 on: July 20, 2016, 03:29:44 PM »
Hi again, is it possible to change the size of a model by the model scale? I have tried this but each time I run it in game it always will remain the same size of 1 (original)

Blade

  • Posts: 8
  • Country: de
  • Respect: 0
  • Modder and Mapper - Feel free to PM for Help
    • Vistic Clan
Re: Mapping and Scripting Problem Megathread
« Reply #77 on: July 20, 2016, 09:22:31 PM »
yes

modelscale
value

Krish

  • The Challenger
  • Posts: 134
  • Country: gb
  • Respect: 6
  • Mostly playing CJ on FNRP Servers.
    • My Channel
Re: Mapping and Scripting Problem Megathread
« Reply #78 on: July 29, 2016, 04:03:06 AM »
Hi everyone. So I was trying to make a music menu, and this has happened:
pair 'undefined' and 'playing' has unmatching types 'undefined' and 'string'
This is the line that has caused it:
Code: [Select]
while( self.sessionstate == "playing" )And was caused in this thread here:
Code: [Select]
musicMenu() //change nothing there
{

self endon( "death" );
 
self thread onDeath();
self thread onDisconnect();
 
self.hud_music = [];
self.selection = 0;
 
i = 0;
self.hud_music[i] = braxi\_mod::addTextHud( self, 160, 200, 0.35, "left", "top", 2 );
self.hud_music[i].sort = 880;
self.hud_music[i] setShader( "black", 320, 160 );

i++;
self.hud_music[i] = braxi\_mod::addTextHud( self, 270, 180, 1, "left", "top", 1.8 );
self.hud_music[i].sort = 883;
self.hud_music[i] setText( ">^5>^7> Music ^5Menu ^7<^5<^7<" );

i++;
self.hud_music[i] = braxi\_mod::addTextHud( self, 270, 204, 0.93, "left", "top", 1.8 );
self.hud_music[i].sort = 884;
self.hud_music[i] setText( ">^5>^7> ^7Select ^7a ^7Song ^5<^7<^5<" );
 
i++;
self.hud_music[i] = braxi\_mod::addTextHud( self, 288, 360, 1, "center", "top", 1.4 );
self.hud_music[i].sort = 885;
self.hud_music[i] setText( "Press ^5[^7USE^5]^7: ^5Play ^7Song" );

i++;
self.hud_music[i] = braxi\_mod::addTextHud( self, 235, 360, 1, "center", "bottom", 1.4 );
self.hud_music[i].sort = 886;
self.hud_music[i] setText( "^5#FNRP#^7Krish" );
 
for( j = 0; i < level.music.size; j++ )
{
i++;
self.hud_music[i] = braxi\_mod::addTextHud( self, 172, 230+(j*16), 0.93, "left", "top", 1.4 );
self.hud_music[i].sort = 882;
self.hud_music[i].font = "objective";
 
entry = level.music[j];
self.hud_music[i] setText( entry["artist"] + " ^2-^7 " + entry["title"] );
}
 
i++;
self.hud_music[self.hud_music.size] = braxi\_mod::addTextHud( self, 167, 230, 0.4, "left", "top", 1.4 );
self.hud_music[i].sort = 881;
indicator = self.hud_music[self.hud_music.size-1];
indicator setShader( "white", 306, 17 );
 
while( self.sessionstate == "playing" )
{
wait 0.1;
 
if( self attackButtonPressed() )
{
self.hud_music[5+self.selection].alpha = 0.93;
 
self.selection++;
if( self.selection >= level.music.size )
self.selection = 0;
 
item = self.hud_music[5+self.selection];
item.alpha = 1;
indicator.y = item.y;
}
else if( self useButtonPressed() )
{
iPrintln( "^5Now playing: ^7" + level.music[self.selection]["artist"]+" - ^2" +level.music[self.selection]["title"] );
 
ambientPlay( level.music[self.selection]["alias"], 3 );
self freezeControls(0);
level notify ( "song_picked" );
self braxi\_rank::giveRankXp( "trap_activation" );
break;
}
else if( self meleeButtonPressed() )
{
self freezeControls(0);
break;
}
}
Much help appreciated. Thanks.

FNRP-Sphere

  • Clan General Admin
  • *****
  • Posts: 1982
  • Country: nl
  • Respect: 734
Re: Mapping and Scripting Problem Megathread
« Reply #79 on: July 29, 2016, 08:44:07 AM »
You need to call musicMenu() on a player object

Krish

  • The Challenger
  • Posts: 134
  • Country: gb
  • Respect: 6
  • Mostly playing CJ on FNRP Servers.
    • My Channel
Re: Mapping and Scripting Problem Megathread
« Reply #80 on: December 02, 2016, 05:48:50 PM »
Hello again. It has been a while since I last posted on this thread.
I want my brush to move and rotate at the same time, I did this:
trig waittill ("trigger", player);
movingbrush rotateto((0,270,0),2);
movingbrush moveto ((-3136,-10072,0), 3, 0.5);
But I also realized you can use a script origin to move and rotate something at the same time. I don't know how this works though, so I tried this way. However when testing it does not move nor rotate but just stays there without doing anything. Help would be much appreciated and thanks in advance.
EDIT: Never mind, I got help.
« Last Edit: December 03, 2016, 11:09:03 AM by #FNRP#Krish »

 

SimplePortal 2.3.7 © 2008-2022, SimplePortal