How do I import a external javascript

Get help using Construct 2

Post » Sun Feb 22, 2015 9:29 pm

hello guys, hope someone can answer me to this problem about Orthographic Projection of a sphere, seems its working, i need to know if i can translate this javascript(coffescript) into a behavior, where to put where into the javascript template! that's what im asking actually i know is already usable since its still a form of javascript, and works on a damn website(sorry im a bit frustrated, cause the only limit i have is my knowledge and for some reason translating code into a SDK template doesn't makes no sense at all to me), i'm pretty sure C2 can be using this as a very useful behavior for future ball games (as bowling,billiard,golf,etc) please if is possible and u can help translate it will be very helpful. i kinda "patched "the problem myself with a sort of spritesheets but it doesn't really animate properly it will require to create to many sprite sheets on the ball im using, with these method what u wold need is only a PNG that is mapped or 2 faces placed near each other once its loaded wold wrap around it, seen it at work on other websites also, tried to find a forum post here, and the only 1 i could find is dated from 1 2 years ago and the people that where questioning the problem did not left a answer to it if they solved it or not. im pretty sure they did. if u already have the behavior or u can help making that code into a behavior for c2 will help a lot the community.

so here it is please . . . .

http://codepen.io/nakakaz11/pen/eLykw?editors=101
Image
B
64
S
19
G
67
Posts: 1,309
Reputation: 42,003

Post » Sun Feb 22, 2015 9:49 pm

Im not even sure how you would use that as a mechanic, just the same, it would take some adaptation, enough to say you might as well just rewrite it from scratch without the svg elements.
It could be done in events, but like I said, not sure how it would be used in game.
Image ImageImage
B
164
S
49
G
138
Posts: 7,957
Reputation: 91,880

Post » Sun Feb 22, 2015 10:24 pm

not sure if can be done in events, as in C2 events, maybe as behavior events, in the SDK template, but never touched it, hopefully i solve it with Q3D if not this is my only chance :D maybe my hero is watching this thread near the corner :D

Edited @newt damn im stupid, and lazy seems, i have Q3D plugin and i solved the issue, so simple,.... just adding the Q3dMaster object, then add the 3d balls, texture them, same as in 2d, u dont need gravity, then when its moving just make it move lol, has 3 axes movement and orientation , please close it is a solved thread. il do a tutorial for those who dont know how to do it. thats a big big dumb move from me not using what i bought hahaha thanks for the ideea newt however if someone solves this issue without the need of Q3d then its even better maybe @Ashley can implement it in defaults C2 plugins list :)
Image
B
64
S
19
G
67
Posts: 1,309
Reputation: 42,003


Return to How do I....?

Who is online

Users browsing this forum: OddConfection, senna68, smlyldz and 11 guests