Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 12,709 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
collision,splitscreen,actions,physics help needed! #187787
03/10/08 10:22
03/10/08 10:22
Joined: Mar 2008
Posts: 17
Kärnten, Austria
T
Tarandur Offline OP
Newbie
Tarandur  Offline OP
Newbie
T

Joined: Mar 2008
Posts: 17
Kärnten, Austria
i know it should be able to solve this on my own, but i cant as im not used to c-skript.

i need some code for the collision event between to specific models/objects and for the split screen, i know split screen is explained in any aum, but i am not able to translate the code.

how do i handle actions ? is it possible to write an action that follows after an event, and to add them to a model in WED ?

is there any option to make blocks (not models) im WED "physical" (flags?)?

thanks for all answers, thats all .

Re: collision,splitscreen,actions,physics help needed! [Re: Tarandur] #187788
03/10/08 12:49
03/10/08 12:49
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Blocks können nicht bewegt werden, dafür braucht es immer eine Entity.
Deine erste Frage: wird alles im script Tutorial erklärt...

Re: collision,splitscreen,actions,physics help nee [Re: Tarandur] #187789
03/10/08 17:22
03/10/08 17:22
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
It sounds like your just starting off, so let me be the first to say welcome .

First this first is that to do events, it helps to consult the manual (see the download section) to keep track of them all. Under the manual search for event in your index, it will bring up several selections. Read through them and pick which ones you want. In the example of event_impact the following example code is given in the manual to help you out. Simply take this code, put it in your .c file your working on, and include that .c file (assuming your working in lite-C/A7), then go into WED and under file you'll find map properties, in there include your file.

Re-load your map and insert a model, click on the model and you'll see all applicable actions under properties. Select the one you inputted the code in and it should work. There are plenty of walkthroughs that will help you do all of this in both the AUM's and other areas.

bounce_event is a function that is called each time an event is triggered, so anytime an event is triggered, it will go to here and pick from the applicable events you have defined (if available), in this case when your model hits something (another model for example) it will play a sound and remove itself from the game. The action itself is what is assigned to the model in question, the three lines turns on the event and attaches it to the model as a trigger-able event. The last line will tell what function to go to to search for the code to trigger.
Code:
 function bounce_event()
{
if (event_type == EVENT_IMPACT)
{
ent_playsound(my,explode,50);
ent_remove(me); // disappear when hit
}
}

action exploding_barrel()
{
my.ENABLE_IMPACT = ON; // sensible for push collision
my.emask |= ENABLE_IMPACT;
my.event = bounce_event;
...
}



For more actions you'll have to be more specific to what your trying to do, and what your having problems with, no one is going to solve your complete problem just because you hit a road block, you have to go half way at the very least.

Your last question, I'm not sure what your asking, but you can make level blocks have different qualities based on there flags, just open one up and look at its properties, look in the manual for explanations.

Seriously though dude, make sure you read up on this stuff you will get horrible lost and frustrated if you just start doing stuff with no previous understanding.


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: collision,splitscreen,actions,physics help nee [Re: Trooper119] #187790
03/10/08 22:34
03/10/08 22:34
Joined: Oct 2006
Posts: 175
G
Gumby22don Offline
Member
Gumby22don  Offline
Member
G

Joined: Oct 2006
Posts: 175
To play with split screen, first try setting camera.x, camera.y and camera.width and .height - this'll show you how a VIEW entity works onscreen, and then you just create a second VIEW object and set it below a half-height camera. Or you can actually turn camera off, and create your own 2, if you want to be finicky.

Don
have a great day

Re: collision,splitscreen,actions,physics help nee [Re: Tarandur] #187791
03/11/08 18:03
03/11/08 18:03
Joined: Mar 2008
Posts: 17
Kärnten, Austria
T
Tarandur Offline OP
Newbie
Tarandur  Offline OP
Newbie
T

Joined: Mar 2008
Posts: 17
Kärnten, Austria
thanks for your fast posts, the only thing i havn´t understood yet is the
.emask parameter, what exactly is it doing?.

Re: collision,splitscreen,actions,physics help nee [Re: Tarandur] #187792
03/11/08 22:19
03/11/08 22:19
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
with emask you say to the entity, on what it react.
ENABLE_IMPACT: the my.event goes when impact from other entities.
ENABLE_CLICK: the my.event goes when left mouse click.
ENABLE_BLOCK: the my.event goes when impact with Blocks:
and so on...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1