![]() |
Grabbing of floor?
is there a way to do add items (guns, items, etc.) that are lying on the ground? would i have to make it like this? and so it dissapears.
PHP Code:
|
Quote:
|
PHP Code:
|
Quote:
|
Quote:
|
You can...sort of set clientr vars clientside
but I think it it acts more like a public variable (a.k.a. without a heading like this. or temp.) that happens to start with "clientr," therefore effectively replacing a real one that may exist. Anyways, it really is best to use triggeractions for this... |
Quote:
|
destroy() not destroy;
|
Quote:
|
If that's what you're gonna use, it should be clientsided in a system NPC.
|
Quote:
|
I thought clientr. variables had to be set serverside? Or am I totally wrong?
Either way, I would set something like that serverside. |
and in that script that angel made, what would i edit to make it show an icon?
|
well thats part of a system weapon. For Instance you add this to a weapon.
PHP Code:
PHP Code:
|
PHP Code:
|
That script needs some work (I would add logging, etc, and checks to make sure it hasn't already been picked up but not destroyed for some reason.
However, I would do something like setImg( this.img ); and then PHP Code:
|
Quote:
PHP Code:
|
Quote:
|
Quote:
and is there a way to randomize spawn points once picked up? like PHP Code:
|
I would get rid of the destroy() and add a hide, then sleep, then warp it, and show it.
As for warping it, this.x = random( 0, 200 ) and the same for y. I'll give an example when I get home, hard to script on a phone. |
Quote:
PHP Code:
|
Actually, Dusty, temp.random should just be int(random(0,temp.spawnpoints.size()));
shouldn't it? o.0 |
PHP Code:
|
That it should be... I think... my mind isn't processing so I'm having a hard time double checking if it's right or wrong. I'll go ahead and say you're right.
And no, that won't work. temp. is only accessible in the function it's called in. You're gonna have to change that temp. to a this. |
PHP Code:
|
no. setlevel2 is for warping players. Use this.x and this.y
|
Quote:
|
Hmm, I...think you can do that with setting this.level. I'm not entirely sure, though. I've never really tried it.
|
Quote:
|
To warp an npc you would use warpto(levelname, x, y);
|
PHP Code:
|
have you tried it? :p
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
And you don't give info at all, do you? Sorry, can't help you. |
Quote:
|
Night, I'll help you with this whenever we're both on if you like.
Post your code. |
| All times are GMT +2. The time now is 02:07 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.