logbold function help D:

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

logbold function help D:

#1

Post by ibm5155 » Mon Mar 04, 2013 10:31 pm

well the bad news is, logbold doesn´t exist =/
I was trying to create a fake player that would say mensages for other players, using log it worked perfectly, but the problem is the same as print, it only show to only one person =/, and i need to show it to everyone D:

So how could I do something like log but that show to all players?
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: logbold function help D:

#2

Post by Ijon Tichy » Mon Mar 04, 2013 10:36 pm

Have the Log be in a clientside script.

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: logbold function help D:

#3

Post by ibm5155 » Mon Mar 04, 2013 11:44 pm

Ijon Tichy wrote: Have the Log be in a clientside script.
it´s on a void state, how to it on a clientside script? :s
ex:

Code: Select all

 script 1 (void)
 {
   log(s:"everyone can see it");
 }

Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: logbold function help D:

#4

Post by Ijon Tichy » Mon Mar 04, 2013 11:47 pm

stick "clientside" at the end of the first line

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: logbold function help D:

#5

Post by ibm5155 » Mon Mar 04, 2013 11:55 pm

Wow all the search for a simple solution D: O_O
thanks Ijon Tichy, it worked really well :D

To avoid the second thread question I´ll use this one.
On my log I need the player tid that a monster is trying to kill, ex:
script 1 (void) clientside
{
log(s:"the spectre wanna kill ", n:playernumber);
}

The information that i don´t know how to get is playernumber :s
Any idea how do get it? (it´s not a demon, its a monster created on decorate, and it´ll be only one of it on the map)
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: logbold function help D:

#6

Post by Ijon Tichy » Tue Mar 05, 2013 12:00 am

n:PlayerNumber()+1

edit: well that works if you're running the script on the player being targeted; if it's running on the demon itself, you have to do something like this first

Code: Select all

script 1 (void) clientside
{
    SetActivatorToTarget(0);
    
    if (ClassifyActor(0) & ACTOR_PLAYER)
    {
        Log(s:"Demon's target is ", n:PlayerNumber()+1);
    }
}
Last edited by Ijon Tichy on Tue Mar 05, 2013 12:01 am, edited 1 time in total.

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: logbold function help D:

#7

Post by ibm5155 » Tue Mar 05, 2013 12:21 am

hmm it worked and didn´t worked xd
but when he´s going to try to kill me it shows other player name :s

it looks like he print the number of the first player :S
ex:(on the online test that was the player order {zombieman, chubus, ibm5155} and he was only showing the zombieman name});

that´s the situation xD

Code: Select all

script 28 (void) clientside
{
    int test=0;
    while(true)
    {
        AmbientSound("misc/chat",127);
        test=random(0,23);
        SetActivatorToTarget(0);
        if (ClassifyActor(0) && ACTOR_PLAYER)
        {
            switch(test)
            {
            case 0:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" I am going to kill you!!!");
                break;
            case 1:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" Let me see what is your blood color");
                break;
            case 2:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s: " You should run. I am going to kill you");
                break;
            case 3:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" Your health is going to go to \cgzero \cd:)");
                break;
            case 4:
                Log(s:"\cgRAVISHING\cd:HI Soulsphere Lets have fun :D");
                break;
            case 5:
                Log(s:"\cgRAVISHING\cd:I love lava. kill them all!!!");
                break;
            case 6:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" You smell potatoe, i love potatoe *_*");
                break;
            case 7:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" See you on hell :)");
                break;
            case 8:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" >.< you are a dead marine");
                break;
            case 9:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" you are my hamburguer *_*");
                break;
            case 10:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" I wanna play a game with you ^^");
                break;
            case 11:
                Log(s:"\cgRAVISHING\cd:Its time to kill");
                break;
            case 12:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" Do you wanna be my friend?");
                break;
            case 13:
                Log(s:"\cgRAVISHING\cd: Im the best ghoul on zombie horde");
                break;
            case 14:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" Can I kill you?");
                break;
            case 15:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" You killed my mom, now you ll have the same end");
                break;
            case 16:
                Log(s:"\cgRAVISHING\cd: Let's the ravishing game begins");
                break;
            case 17:
                Log(s:"\cgRAVISHING\cd: I love Zombie Horde");
                break;
            case 18:
                Log(s:"\cgRAVISHING\cd: I love this map");
                break;
            case 19:
                Log(s:"\cgRAVISHING\cd: I am a doctor, if you have a problem, call me!!!");
                break;
            case 20:
                Log(s:"\cgRAVISHING\cd: I am a Doom fan");
                break;
            case 21:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" So, you like doom?");
                break;
            case 22:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" I have a bad news for you, I am your father!!!");
                break;
            case 23:
                Log(s:"\cgRAVISHING\cd: ",n:PlayerNumber(),s:" Lets play a game, if i win, you die.");
                break;
            }
        }
        else;
        delay(35);
    }   
}

Last edited by ibm5155 on Tue Mar 05, 2013 12:22 am, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: logbold function help D:

#8

Post by Ijon Tichy » Tue Mar 05, 2013 12:24 am

only SetActivatorToTarget once; the activator doesn't go back to the monster after a Delay

also n: starts from 1 for player numbers, and PlayerNumber starts from 0, hence why I added 1
Last edited by Ijon Tichy on Tue Mar 05, 2013 12:25 am, edited 1 time in total.

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: logbold function help D:

#9

Post by ibm5155 » Tue Mar 05, 2013 5:41 pm

I still don´t get how PlayerNumber()+1 could show the player tid that the ravishing is Chasing :s
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Post Reply