Page 1 of 1

Jumppad question

Posted: February 28th, 2010, 4:40 pm
by |uB|Travis
Is there a way to make a jumppad give more height if you hit it from higher up? also if you hit it faster you fly farther?

Thanks

Re: Jumppad question

Posted: February 28th, 2010, 5:47 pm
by Hirato
the code is in src/fpsgame/entities.cpp - have fun :)

Re: Jumppad question

Posted: March 1st, 2010, 7:11 pm
by |uB|Travis
I dont really get it, im really new to this. Could you explain to me what it is line by line? Heres the code


Code: Select all

case JUMPPAD:
            {
                if(d->lastpickup==ents[n]->type && lastmillis-d->lastpickupmillis<300) break;
                d->lastpickup = ents[n]->type;
                d->lastpickupmillis = lastmillis;
                vec v((int)(char)ents[n]->attr3*10.0f, (int)(char)ents[n]->attr2*10.0f, ents[n]->attr1*12.5f);
                d->timeinair = 0;
		if(d->ai) d->ai->becareful = true;
                d->falling = vec(0, 0, 0);
//                d->vel = v;
                d->vel.z = 0;
                d->vel.add(v);
                msgsound(S_JUMPPAD, d);
                break;
            }


Thanks in Advance

Re: Jumppad question

Posted: March 10th, 2010, 4:04 pm
by Obsidian
Topic moved
Reason: Moved to Sandbox Support as this is a support request.