Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes the client misses the player-speed or texture. #5

Open
waleed177 opened this issue Jul 8, 2020 · 0 comments
Open

Sometimes the client misses the player-speed or texture. #5

waleed177 opened this issue Jul 8, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@waleed177
Copy link
Owner

Sometimes while executing this code, the client does not recieve the player speed, or the players texture (name? or the actual texture idk).

images C:\Users\waldohp\Desktop\Files\Projects\WUI Engine\Images\

Camera:
	camera-follow localPlayer

FoodSpawner:
	.timeLeft 10
	onUpdate
		this.timeLeft--;
		if this.timeLeft <= 0:
			this.timeLeft = random 10 20;
			instantiate "Food" random 0-300 300; random 0-300 300;; 

Player:
	topDownPlayer
	player-speed 300 300
	texture player.png
	size 32 32
	position 0 0
	.type 0
	.size 32
	boxCollider
	onLoad
		teleport this.object random 0-300 300; random 0-300 300;;
	onCollisionStay
		if other.type == 0 if other.size < this.size:
			this.size += other.size;
			inflate this.object other.size other.size;
			remove other.object;
	client-onUpdate
		if keyDown "Y"; && isClientOwned this.object;: move this.object 10 10;
	
Food:
	boxCollider
	texture food.png
	size 8 8
	position 0 0
	.type 1
	onCollisionStay
		if other.type == 0:
			inflate other.object 5 5;
			other.size += 5;
			remove this.object;
@waleed177 waleed177 added the bug Something isn't working label Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant